Examples of initManagedObject()


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

   
    vdb.addDataPolicy(roleOne);
   
    // convert to managed object and build the VDB out of MO
    ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
    ManagedObject mo = mof.initManagedObject(vdb, null, null);
    vdb = AdminObjectBuilder.buildAO(mo, VDBMetaData.class);
   
    assertEquals("myVDB", vdb.getName());
    assertEquals("vdb description", vdb.getDescription());
    assertEquals(1, vdb.getVersion());
View Full Code Here

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

    tm.setName("Oracle");
    tm.addProperty("ExtensionTranslationClassName", "org.teiid.translator.jdbc.oracle.OracleSQLTranslator");
   
    // convert to managed object and build the VDB out of MO
    ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
    ManagedObject mo = mof.initManagedObject(tm, null, null);
    tm = AdminObjectBuilder.buildAO(mo, TranslatorMetaData.class);
   
    assertEquals("Oracle", tm.getName());
    assertEquals(ExecutionFactory.class.getName(), tm.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
    assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", tm.getPropertyValue("ExtensionTranslationClassName"));   
View Full Code Here

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

      String rootElementName = "datasources";
      if("local-tx-datasource".equals(cfType))
      {
         mcf = new LocalDataSourceDeploymentMetaData();
         mof.setInstanceClassFactory(LocalDataSourceDeploymentMetaData.class, new LocalDSInstanceClassFactory(mof));
         cfMO = mof.initManagedObject(mcf,
            KnownComponentTypes.DataSourceTypes.LocalTx.getType().getType(),
            KnownComponentTypes.DataSourceTypes.LocalTx.getType().getSubtype());
      }
      else if("xa-datasource".equals(cfType))
      {
View Full Code Here

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

      enableTrace("org.jboss.managed.plugins.factory");
      ManagedObjectFactory mof = ManagedObjectFactory.getInstance();
      TxInstanceClassFactory icf = new TxInstanceClassFactory();
      mof.setInstanceClassFactory(TxConnectionFactoryDeploymentMetaData.class, icf);
      TxConnectionFactoryDeploymentMetaData txcf = new TxConnectionFactoryDeploymentMetaData();
      ManagedObject mo = mof.initManagedObject(txcf, "TxConnectionFactoryDeploymentMetaData", null);
      // Validate the expected property names
      Set<String> expectedPropertyNames = new TreeSet<String>();
      expectedPropertyNames.addAll(Arrays.asList(ManagedConnectionFactoryDeploymentMetaData_NAMES));
      expectedPropertyNames.addAll(Arrays.asList(TxConnectionFactoryDeploymentMetaData_NAMES));
      Set<String> propertyNames = mo.getPropertyNames();
View Full Code Here

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

      LocalDataSourceDeploymentMetaData lds = new LocalDataSourceDeploymentMetaData();
      // Set a SecurityMetaData to validate its MO
      SecurityMetaData smd = new ApplicationManagedSecurityMetaData();
      smd.setDomain("java:/jaas/SomeDomain");
      lds.setSecurityMetaData(smd);
      ManagedObject mo = mof.initManagedObject(lds, "LocalDataSourceDeploymentMetaData", null);
      // Validate the expected property names
      Set<String> expectedPropertyNames = new TreeSet<String>();
      expectedPropertyNames.addAll(Arrays.asList(ManagedConnectionFactoryDeploymentMetaData_NAMES));
      expectedPropertyNames.addAll(Arrays.asList(DataSourceDeploymentMetaData_NAMES));
      expectedPropertyNames.addAll(Arrays.asList(NonXADataSourceDeploymentMetaData_NAMES));
View Full Code Here

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

      enableTrace("org.jboss.managed.plugins.factory");
      ManagedObjectFactory mof = ManagedObjectFactory.getInstance();
      XADSInstanceClassFactory icf = new XADSInstanceClassFactory();
      mof.setInstanceClassFactory(XADataSourceDeploymentMetaData.class, icf);
      XADataSourceDeploymentMetaData xads = new XADataSourceDeploymentMetaData();
      ManagedObject mo = mof.initManagedObject(xads, "XADataSourceDeploymentMetaData", null);
      // Validate the expected property names
      Set<String> expectedPropertyNames = new TreeSet<String>();
      expectedPropertyNames.addAll(Arrays.asList(ManagedConnectionFactoryDeploymentMetaData_NAMES));
      expectedPropertyNames.addAll(Arrays.asList(DataSourceDeploymentMetaData_NAMES));
      expectedPropertyNames.addAll(Arrays.asList(XADataSourceDeploymentMetaData_NAMES));
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.