Package org.jboss.resource.metadata.mcf

Examples of org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData


   }

   @Override
   protected void setComponentName(PersistedComponent component, ManagedObject mo)
   {
       ManagedConnectionFactoryDeploymentMetaData metaData =
          (ManagedConnectionFactoryDeploymentMetaData) mo.getAttachment();
       // Set the current name;
       component.setName(metaData.getJndiName());
   }
View Full Code Here


  
   @Override
   protected ManagedObject getComponent(Object attachment, PersistedComponent component, boolean create)
   {
      ManagedConnectionFactoryDeploymentGroup deployment = (ManagedConnectionFactoryDeploymentGroup) attachment;
      ManagedConnectionFactoryDeploymentMetaData metaData = null;
      if(deployment.getDeployments() != null && deployment.getDeployments().isEmpty() == false)
      {
         for(ManagedConnectionFactoryDeploymentMetaData md : deployment.getDeployments())
         {
            if(md.getJndiName().equals(component.getOriginalName()))
View Full Code Here

      {
         SimpleValue dsTypeSV = (SimpleValue) dsTypeMP.getValue();
         cfType = dsTypeSV.getValue().toString();
      }

      ManagedConnectionFactoryDeploymentMetaData mcf;
      ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
      ManagedObject cfMO;

      String rootElementName = "datasources";
      if("local-tx-datasource".equals(cfType))
View Full Code Here

      builders.add(new ConnectionManagerBuilder());

      // builders.add(new MetaDataTypeMappingBuilder());

      ManagedConnectionFactoryDeploymentGroup group = ManagedDeploymentSupportHelper.unmarshalResource("jca/remote-jdbc/remote-ds.xml");
      ManagedConnectionFactoryDeploymentMetaData mcmd = group.getDeployments().get(0);

      List<ServiceMetaData> results = new ArrayList<ServiceMetaData>();

      for (AbstractBuilder abstractBuilder : builders)
      {
View Full Code Here


   public void testConnectionPoolUnmarshal() throws Exception
   {
      ManagedConnectionFactoryDeploymentGroup group = ManagedDeploymentSupportHelper.unmarshalResource("jca/deployment/pool-content-ds.xml");
      ManagedConnectionFactoryDeploymentMetaData md = group.getDeployments().get(0);
      assertTrue(md.getPrefill());
   }
View Full Code Here

   }

   public void testEmptyContentUnmarshal() throws Exception
   {
      ManagedConnectionFactoryDeploymentGroup group = ManagedDeploymentSupportHelper.unmarshalResource("jca/deployment/empty-content-ds.xml");
      ManagedConnectionFactoryDeploymentMetaData md = group.getDeployments().get(0);
      assertTrue(md.getTrackConnectionByTransaction()); // this is always true for local tx
      assertFalse(md.isInterleaving());
      assertTrue(md.getNoTxSeparatePools());
      assertTrue(md.getUseStrictMin());
      assertEquals(0, md.getAllocationRetry());
      assertEquals(5000, md.getAllocationRetryWaitMillis());
   }
View Full Code Here

   public void testEmptyContentMarshal() throws Exception
   {
      ManagedConnectionFactoryDeploymentGroup group = ManagedDeploymentSupportHelper.unmarshalResource("jca/deployment/empty-content-ds.xml");
      String result = ManagedDeploymentSupportHelper.marshalResourceAsString(group);
      group = ManagedDeploymentSupportHelper.unmarshalSource(result);
      ManagedConnectionFactoryDeploymentMetaData md = group.getDeployments().get(0);
      assertTrue(md.getTrackConnectionByTransaction()); // this is always true for local tx
      assertFalse(md.isInterleaving());
      assertTrue(md.getNoTxSeparatePools());
      assertTrue(md.getUseStrictMin());
      assertEquals(0, md.getAllocationRetry());
      assertEquals(5000, md.getAllocationRetryWaitMillis());
   }
View Full Code Here

   public void testXAWithInterleavingMarshal() throws Exception
   {
      ManagedConnectionFactoryDeploymentGroup group = ManagedDeploymentSupportHelper.unmarshalResource("jca/deployment/xa-interleaving-ds.xml");
      String result = ManagedDeploymentSupportHelper.marshalResourceAsString(group);
      group = ManagedDeploymentSupportHelper.unmarshalSource(result);
      ManagedConnectionFactoryDeploymentMetaData md = group.getDeployments().get(0);
      assertFalse(md.getTrackConnectionByTransaction());
      assertTrue(md.isInterleaving());

   }
View Full Code Here

   }

   public void testBasicUnmarshal() throws Exception
   {
      ManagedConnectionFactoryDeploymentGroup group = ManagedDeploymentSupportHelper.unmarshalResource("jca/remote-jdbc/remote-ds.xml");
      ManagedConnectionFactoryDeploymentMetaData md = group.getDeployments().get(0);

      assertTrue(group.getDeployments().size() == 1);
      assertTrue(md instanceof LocalDataSourceDeploymentMetaData);
      assertTrue(md.getLocalTransactions());

      assertTrue(ManagedDeploymentSupportHelper.isValidDeployment("jca/remote-jdbc/remote-ds.xml", md, "jndi-name",
            "connection-url"));

      assertTrue(ManagedDeploymentSupportHelper.hasAnnotation(md, "jndiName"));
View Full Code Here

   protected void assertDeployments(List<ManagedConnectionFactoryDeploymentMetaData> deployments)
   {
      assertNotNull(deployments);
      assertEquals(1, deployments.size());
     
      ManagedConnectionFactoryDeploymentMetaData deployment = deployments.get(0);
      assertNotNull(deployment);
      assertEquals(13, deployment.getMinSize());
      assertEquals(53, deployment.getMaxSize());
   }
View Full Code Here

TOP

Related Classes of org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData

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.