Package org.jboss.system.server.profileservice.persistence.xml

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


     
      ManagedObject temp = getMOF().initManagedObject(addComponent, null);
      ManagedComponent component = new TestMgtComponentImpl(temp);
     
      ManagedObject mo = createDeploymentMO();
      PersistenceRoot root = getPersistenceFactory().addComponent(mo, component);
     
      root = restore(root);
     
      TestDeployment attachment = createDeploymentMetaData();
      getPersistenceFactory().restorePersistenceRoot(root, attachment, null);
View Full Code Here


      ManagedObject component1 = (ManagedObject) ((GenericValue) iterator.next()).getValue();
      ManagedObject component2 = (ManagedObject) ((GenericValue) iterator.next()).getValue();
     
      // create the persistence information
      TestMgtComponentImpl tComp1 = new TestMgtComponentImpl(component1);
      PersistenceRoot root = getPersistenceFactory().updateComponent(mo, tComp1);
      TestMgtComponentImpl tComp2 = new TestMgtComponentImpl(component2);
      root = getPersistenceFactory().updateComponent(root, mo, tComp2);     
     
      assertNotNull(root.getComponents());
      // serialize / deserialize
      PersistenceRoot persisted = restore(root);
     
      // Create a new root attachment with empty components
      TestDeployment test = new TestDeployment();
      test.getComponents().add(createComponentMetaData("component1", null, null));
      test.getComponents().add(createComponentMetaData("component2", null, null));
View Full Code Here

      Iterator<?> iterator = ((CollectionValue) mo.getProperty("components").getValue()).iterator();
      ManagedObject component1 = (ManagedObject) ((GenericValue) iterator.next()).getValue();
     
      // create the persistence information
      TestMgtComponentImpl tComp1 = new TestMgtComponentImpl(component1);
      PersistenceRoot root = getPersistenceFactory().removeComponent(mo, tComp1);
      PersistenceRoot persisted = restore(root);

      // Check removed
      TestDeployment deployment = createDeploymentMetaData();
      getPersistenceFactory().restorePersistenceRoot(persisted, deployment, null);
      assertEquals(1, deployment.getComponents().size());
     
      // Reset
      root = getPersistenceFactory().resetComponent(persisted, mo, tComp1);
      persisted = restore(root);
      assertNull(persisted.getComponents());
   }
View Full Code Here

      addComponentMapper(new TestComponentMapper(getPersistenceFactory()));

      // Get the components
      ManagedObject mo = createDeploymentMO();

      PersistenceRoot root = new PersistenceRoot();
     
      TestDeployment deployment = updateName(root, mo, "change1");
      mo = getMOF().initManagedObject(deployment, null);
     
      deployment = updateName(root, mo, "change2");
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

      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 TempManagedComponentImpl(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

      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

TOP

Related Classes of org.jboss.system.server.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.