Package org.jboss.profileservice.persistence.xml

Examples of org.jboss.profileservice.persistence.xml.PersistenceRoot


         for(AttachmentMetaData attachment: metaData.getAttachments())
         {
            Object instance = unit.getAttachment(attachment.getName());
            if(instance != null)
            {
               PersistenceRoot root = getPersistenceRepository().loadAttachment(deploymentName, simpleName, attachment);
               if(root == null)
               {
                  log.warn("Null persisted information for deployment: " + deploymentName);
               }
               // update ...
View Full Code Here


      attachment.setClassName(managedObject.getAttachment().getClass().getName());

      // Save the attachment
      String attachmentPath = deploymentPath + attachment.getName();
      // Create the persistence information
      PersistenceRoot persistenceRoot = getSerializer().loadAttachment(attachmentPath, PersistenceRoot.class);
      //
      persistenceRoot = createPersistedMetaData(persistenceRoot, managedObject, component, remove);
      // Serialize the attachment
      getSerializer().saveAttachment(attachmentPath, persistenceRoot);
View Full Code Here

   * @return the xml metadata.
   */
  protected PersistenceRoot createPersistedMetaData(PersistenceRoot root, ManagedObject managedObject, ManagedComponent component, boolean remove)
  {
     if(root == null)
        root = new PersistenceRoot();

     if(remove)
     {
        root = this.persistenceFactory.removeComponent(root, managedObject, component);
     }
View Full Code Here

      ManagedComponent c = createDSComponent(mo);
      // Change values
      c.getProperty("min-pool-size").setValue(SimpleValueSupport.wrap(13));
      c.getProperty("max-pool-size").setValue(SimpleValueSupport.wrap(53));
     
      PersistenceRoot root = updateComponent(mo, c);
      assertNotNull(root);

      // Recreate
      deployment = parseDataSource("profileservice/persistence/profileservice-test-ds.xml");
      // update the information
View Full Code Here

     
      // update property
      component.getProperty("downCacheSize").setValue(SimpleValueSupport.wrap(123456));
     
      ServiceDeployment deployment = parseJbossServiceXml(xmlName);
      PersistenceRoot root = updateComponent(deploymentMO, component);
      getPersistenceFactory().restorePersistenceRoot(root, deployment, null);
     
      //
      ManagedObject restored = getMOF().initManagedObject(deployment, null);
      component = createJMSComponent(restored);
View Full Code Here

      assertEquals(component.getAttachmentName(), SimpleAnnotatedBean.class.getName());

      // Change value
      component.getProperty("stringProperty").setValue(SimpleValueSupport.wrap("changedTestValue"));
     
      PersistenceRoot root = updateComponent(deploymentMO, component);
      assertNotNull(root);

      // Uninstall for offline attachment persistence
      uninstallDeployment(deployment);
     
View Full Code Here

      assertNotNull(bindingSets);
      setPortValue("HttpsConnector", bindingSets, 13245);

      // Persist
      ManagedComponent component = new ManagedComponentImpl(null, null, mo);
      PersistenceRoot root = getPersistenceFactory().updateComponent(deploymentMO, component);
      root.setClassName(AbstractKernelDeployment.class.getName());
      root = restore(root);
     
      // Undeploy
      undeploy(deployment);
      // Restore
View Full Code Here

         persisted.setModificationInfo(ModificationInfo.ADDED);
        
         components.add(new PersistedComponent(persisted));
      }
     
      PersistenceRoot root = new PersistenceRoot();
      root.setComponents(components);
      root = restore(root);
     
      // Test if we can recreate a complete view, without
      // requiring any previous service
      deployment = new ServiceDeployment();
View Full Code Here

      persistenceFactory.addComponentMapper(mapper);
   }
  
   protected PersistenceRoot updateComponent(ManagedObject parent, ManagedComponent component) throws Exception
   {
      PersistenceRoot root = getPersistenceFactory().updateComponent(parent, component);
      return restore(root);
   }
View Full Code Here

TOP

Related Classes of org.jboss.profileservice.persistence.xml.PersistenceRoot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.