Examples of initManagedObject()


Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      }
      else if("xa-datasource".equals(cfType))
      {
         mcf = new XADataSourceDeploymentMetaData();
         mof.setInstanceClassFactory(XADataSourceDeploymentMetaData.class, new XADSInstanceClassFactory(mof));
         cfMO = mof.initManagedObject(mcf,
            KnownComponentTypes.DataSourceTypes.XA.getType().getType(),
            KnownComponentTypes.DataSourceTypes.XA.getType().getSubtype());
      }
      else if("tx-connection-factory".equals(cfType))
      {
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      else if("tx-connection-factory".equals(cfType))
      {
         rootElementName = "connection-factories";
         mcf = new TxConnectionFactoryDeploymentMetaData();
         mof.setInstanceClassFactory(TxConnectionFactoryDeploymentMetaData.class, new TxInstanceClassFactory(mof));
         cfMO = mof.initManagedObject(mcf,
            KnownComponentTypes.ConnectionFactoryTypes.XA.getType().getType(),
            KnownComponentTypes.ConnectionFactoryTypes.XA.getType().getSubtype());
      }
      else if("no-tx-connection-factory".equals(cfType))
      {
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      else if("no-tx-connection-factory".equals(cfType))
      {
         rootElementName = "connection-factories";
         mcf = new NoTxConnectionFactoryDeploymentMetaData();
         mof.setInstanceClassFactory(NoTxConnectionFactoryDeploymentMetaData.class, new NoTxCFInstanceClassFactory(mof));
         cfMO = mof.initManagedObject(mcf,
            KnownComponentTypes.ConnectionFactoryTypes.NoTx.getType().getType(),
            KnownComponentTypes.ConnectionFactoryTypes.NoTx.getType().getSubtype());
      }
      else if("no-tx-datasource".equals(cfType))
      {
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      }
      else if("no-tx-datasource".equals(cfType))
      {
         mcf = new NoTxDataSourceDeploymentMetaData();
         mof.setInstanceClassFactory(NoTxDataSourceDeploymentMetaData.class, new NoTxInstanceClassFactory(mof));
         cfMO = mof.initManagedObject(mcf,
            KnownComponentTypes.DataSourceTypes.NoTx.getType().getType(),
            KnownComponentTypes.DataSourceTypes.NoTx.getType().getSubtype());
      }
      else
         throw new IllegalStateException("Unexpected value connection factory type: " + cfType);
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      for(String name : attachments)
      {
         Object instance = unit.getAttachment(name);
         if (instance != null)
         {
            ManagedObject mo = factory.initManagedObject(instance, metaData);
            if (mo != null)
               managedObjects.put(mo.getName(), mo);
         }
      }
   }
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      BigDecimal bigDecimal = new BigDecimal(10);
      SimpleUnannotated simple = new SimpleUnannotated();
      simple.setBigDecimalValue(bigDecimal);

      ManagedObjectFactory mof = getMOF();
      ManagedObject managedObject = mof.initManagedObject(simple, metaData);
      assertEquals("testMetaDataRepositoryOverride", managedObject.getName());
      Map<String, Annotation> moAnnotations = managedObject.getAnnotations();
      assertEquals("MO annotations == 2;", 2, moAnnotations.size());
      ManagementObject moAnn = (ManagementObject) moAnnotations.get(ManagementObject.class.getName());
      ManagementComponent componentType = moAnn.componentType();
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

   public void testMCFHierarchy()
      throws Exception
   {
      ManagedConnectionFactoryDeploymentGroup mcf = initMCFDG();
      ManagedObjectFactory mof = getMOF();
      ManagedObject mcfMO = mof.initManagedObject(mcf, "ManagedConnectionFactoryDeploymentGroup", null);
      ManagedProperty deployments = mcfMO.getProperty("deployments");
      Object dvalue = deployments.getValue();
      assertTrue(dvalue.getClass()+"", dvalue instanceof CollectionValue);
      CollectionValue cv = (CollectionValue) dvalue;
      assertEquals(1, cv.getSize());
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

   {
      ManagedConnectionFactoryDeploymentGroup mcf = initMCFDG();
      ManagedObjectFactory mof = getMOF();
      LocalDSInstanceClassFactory dsicf = new LocalDSInstanceClassFactory();
      mof.addInstanceClassFactory(dsicf);
      ManagedObject mcfMO = mof.initManagedObject(mcf, "ManagedConnectionFactoryDeploymentGroup", null);
      ManagedProperty deployments = mcfMO.getProperty("deployments");
      Object dvalue = deployments.getValue();
      assertTrue(dvalue.getClass()+"", dvalue instanceof CollectionValue);
      CollectionValue cv = (CollectionValue) dvalue;
      assertEquals(1, cv.getSize());
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      XADataSourceMetaData xads = new XADataSourceMetaData();
      ArrayList<ConnMetaData> deployments = new ArrayList<ConnMetaData>();
      deployments.add(ds);
      deployments.add(xads);
      dsmd.setDeployments(deployments);
      ManagedObject mo = mof.initManagedObject(dsmd, null, null);

      // Validate the expected properties
      Map<String, ManagedProperty> propsMap = mo.getProperties();
      assertEquals(2, propsMap.size());
      log.info("DSMetaData properties: "+propsMap);
View Full Code Here

Examples of org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject()

      for(Object metaData : attachments.values() )
      {
         if( metaData instanceof Serializable )
         {
            Serializable smetaData = Serializable.class.cast(metaData);
            ManagedObject mo = factory.initManagedObject(smetaData, null, null);
            if (mo != null)
               managedObjects.put(mo.getName(), mo);
         }
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.