Package org.jboss.metadata

Examples of org.jboss.metadata.ConfigurationMetaData


   protected void unableToPassivateDueToCtxLock(EnterpriseContext ctx, boolean passivateAfterCommit)
   {
      EntityEnterpriseContext ectx = (EntityEnterpriseContext)ctx;
      ectx.setPassivateAfterCommit(passivateAfterCommit);
      ConfigurationMetaData config = m_container.getBeanMetaData().getContainerConfiguration();
      if(!config.isStoreNotFlushed() && ectx.hasTxSynchronization())
      {
         ectx.setTxAssociation(GlobalTxEntityMap.PREVENT_SYNC);
      }
   }
View Full Code Here


      this.schema = schema;
      this.tableId = tableId;

      final EntityMetaData entityMetaData = ((EntityMetaData)entity.getContainer().getBeanMetaData());
      final ConfigurationMetaData containerConf = entityMetaData.getContainerConfiguration();
      dontFlushCreated = containerConf.isInsertAfterEjbPostCreate();

      // create cache
      final Element cacheConf = containerConf.getContainerCacheConf();
      final Element cachePolicy = cacheConf == null ? null : MetaData.getOptionalChild(cacheConf, "cache-policy-conf");

      int minCapacity;
      int maxCapacity;
      if(cachePolicy != null)
View Full Code Here

   private MessageDrivenContainer createMessageDrivenContainer(BeanMetaData bean, DeploymentUnit unit) throws Exception
   {
      // get the container configuration for this bean
      // a default configuration is now always provided
      ConfigurationMetaData conf = bean.getContainerConfiguration();
      // Stolen from Stateless deploy
      // Create container
      MessageDrivenContainer container = new MessageDrivenContainer();
      int transType = bean.isContainerManagedTx() ? CMT : BMT;
View Full Code Here

   private StatelessSessionContainer createStatelessSessionContainer(SessionMetaData bean, DeploymentUnit unit)
         throws Exception
   {
      // get the container configuration for this bean
      // a default configuration is now always provided
      ConfigurationMetaData conf = bean.getContainerConfiguration();
      // Create container
      StatelessSessionContainer container = new StatelessSessionContainer();
      int transType = bean.isContainerManagedTx() ? CMT : BMT;
      initializeContainer(container, conf, bean, transType, unit);
      if (bean.getHome() != null || bean.getServiceEndpoint() != null)
View Full Code Here

   private StatefulSessionContainer createStatefulSessionContainer(SessionMetaData bean, DeploymentUnit unit)
         throws Exception
   {
      // get the container configuration for this bean
      // a default configuration is now always provided
      ConfigurationMetaData conf = bean.getContainerConfiguration();
      // Create container
      StatefulSessionContainer container = new StatefulSessionContainer();
      int transType = bean.isContainerManagedTx() ? CMT : BMT;
      initializeContainer(container, conf, bean, transType, unit);
      if (bean.getHome() != null || bean.getServiceEndpoint() != null)
      {
         createProxyFactories(bean, container);
      }

      ClassLoader cl = unit.getClassLoader();
      container.setInstanceCache(createInstanceCache(conf, cl));
      // No real instance pool, use the shadow class
      StatefulSessionInstancePool ip = new StatefulSessionInstancePool();
      ip.importXml(conf.getContainerPoolConf());
      container.setInstancePool(ip);
      // Set persistence manager
      container.setPersistenceManager((StatefulSessionPersistenceManager) cl.loadClass(conf.getPersistenceManager())
            .newInstance());
      // Set the bean Lock Manager
      container.setLockManager(createBeanLockManager(container, false, conf.getLockClass(), cl));

      return container;
   }
View Full Code Here

   private EntityContainer createEntityContainer(BeanMetaData bean, DeploymentUnit unit) throws Exception
   {
      // get the container configuration for this bean
      // a default configuration is now always provided
      ConfigurationMetaData conf = bean.getContainerConfiguration();
      // Create container
      EntityContainer container = new EntityContainer();
      int transType = CMT;
      initializeContainer(container, conf, bean, transType, unit);
      if (bean.getHome() != null)
      {
         createProxyFactories(bean, container);
      }

      ClassLoader cl = unit.getClassLoader();
      container.setInstanceCache(createInstanceCache(conf, cl));
      container.setInstancePool(createInstancePool(conf, cl));
      // Set the bean Lock Manager
      boolean reentrant = ((EntityMetaData) bean).isReentrant();
      BeanLockManager lockMgr = createBeanLockManager(container, reentrant, conf.getLockClass(), cl);
      container.setLockManager(lockMgr);

      // Set persistence manager
      if (((EntityMetaData) bean).isBMP())
      {
         Class pmClass = cl.loadClass(conf.getPersistenceManager());
         EntityPersistenceManager pm = (EntityPersistenceManager) pmClass.newInstance();
         container.setPersistenceManager(pm);
      }
      else
      {
         // CMP takes a manager and a store
         org.jboss.ejb.plugins.CMPPersistenceManager persistenceManager = new org.jboss.ejb.plugins.CMPPersistenceManager();

         // Load the store from configuration
         Class pmClass = cl.loadClass(conf.getPersistenceManager());
         EntityPersistenceStore pm = (EntityPersistenceStore) pmClass.newInstance();
         persistenceManager.setPersistenceStore(pm);
         // Set the manager on the container
         container.setPersistenceManager(persistenceManager);
      }
View Full Code Here

      ApplicationMetaData appMetaData = new ApplicationMetaData(wrapper);
      Iterator<BeanMetaData> beans2 = appMetaData.getEnterpriseBeans();
      while (beans2.hasNext())
      {
         BeanMetaData bean = (BeanMetaData) beans2.next();
         ConfigurationMetaData beanCfg = bean.getContainerConfiguration();
         assertNotNull(beanCfg);
      }

      assertTrue(bindings.size() > 10);
      // Validate some know invoker bindings
      InvokerProxyBindingMetaData ssui = bindings.get("stateless-unified-invoker");
      assertNotNull(ssui);
      InvokerProxyBindingMetaData sfui = bindings.get("stateful-unified-invoker");
      assertNotNull(sfui);

      BeanMetaData beanCfg = appMetaData.getBeanByEjbName("session1EjbName");
      assertNotNull(beanCfg);
      Iterator<String> it = beanCfg.getInvokerBindings();
      org.jboss.metadata.InvokerProxyBindingMetaData imd = null;
      while (it.hasNext() && imd == null)
      {
         String invoker = it.next();
         String jndiBinding = beanCfg.getInvokerBinding(invoker);
         imd = beanCfg.getApplicationMetaData().getInvokerProxyBindingMetaDataByName(invoker);
         assertNotNull(imd);
      }
      assertNotNull(imd);
   }
View Full Code Here

      ApplicationMetaData appMetaData = new ApplicationMetaData(wrapper);
      Iterator<BeanMetaData> beans2 = appMetaData.getEnterpriseBeans();
      while (beans2.hasNext())
      {
         BeanMetaData bean = (BeanMetaData) beans2.next();
         ConfigurationMetaData beanCfg = bean.getContainerConfiguration();
         assertNotNull(beanCfg);
      }

      assertTrue(bindings.size() > 10);
      // Validate some know invoker bindings
      InvokerProxyBindingMetaData ssui = bindings.get("stateless-unified-invoker");
      assertNotNull(ssui);
      InvokerProxyBindingMetaData sfui = bindings.get("stateful-unified-invoker");
      assertNotNull(sfui);

      BeanMetaData beanCfg = appMetaData.getBeanByEjbName("StatelessSessionBean");
      assertNotNull(beanCfg);
      Iterator<String> it = beanCfg.getInvokerBindings();
      org.jboss.metadata.InvokerProxyBindingMetaData imd = null;
      while (it.hasNext() && imd == null)
      {
         String invoker = it.next();
         imd = beanCfg.getApplicationMetaData().getInvokerProxyBindingMetaDataByName(invoker);
         assertNotNull(imd);
      }
      assertNotNull(imd);

      // Validate the merged StrictlyPooledMDB
      JBossEnterpriseBeanMetaData strictlyPooledMDB = beans.get("StrictlyPooledMDB");
      JBossMessageDrivenBeanMetaData strictlyPooledMDBMD = (JBossMessageDrivenBeanMetaData) strictlyPooledMDB;
      assertNotNull("strictlyPooledMDB", strictlyPooledMDB);
      assertEquals("Message driven pooling test", strictlyPooledMDBMD.getDescriptionGroup().getDescription());
      assertEquals("org.jboss.test.cts.ejb.StrictlyPooledMDB", strictlyPooledMDBMD.getEjbClass());
      assertTrue(strictlyPooledMDB.isMessageDriven());
      assertTrue(strictlyPooledMDB instanceof JBossMessageDrivenBeanMetaData);
      assertEquals("AUTO_ACKNOWLEDGE", strictlyPooledMDBMD.getAcknowledgeMode());
      assertEquals("javax.jms.Queue", strictlyPooledMDBMD.getMessageDestinationType());
      assertEquals(SubscriptionDurability.NonDurable, strictlyPooledMDBMD.getSubscriptionDurability());
      EnvironmentEntryMetaData maxActiveCount = strictlyPooledMDBMD.getEnvironmentEntryByName("maxActiveCount");
      assertEquals("maxActiveCountID", maxActiveCount.getId());
      assertEquals("java.lang.Integer", maxActiveCount.getType());
      assertEquals("5", maxActiveCount.getValue());
      assertEquals("queue/A", strictlyPooledMDBMD.getDestinationJndiName());
      assertEquals("Strictly Pooled Message Driven Bean", strictlyPooledMDBMD.getConfigurationName());

      // Test security-identity information     
      org.jboss.metadata.SecurityIdentityMetaData secMetaData = beanCfg.getSecurityIdentityMetaData();
      assertNull(secMetaData);

      BeanMetaData RunAsStatelessSessionBean = appMetaData.getBeanByEjbName("RunAsStatelessSessionBean");
      assertNotNull(RunAsStatelessSessionBean);
      secMetaData = RunAsStatelessSessionBean.getSecurityIdentityMetaData();
View Full Code Here

   private MessageDrivenContainer createMessageDrivenContainer(BeanMetaData bean, DeploymentUnit unit) throws Exception
   {
      // get the container configuration for this bean
      // a default configuration is now always provided
      ConfigurationMetaData conf = bean.getContainerConfiguration();
      // Stolen from Stateless deploy
      // Create container
      MessageDrivenContainer container = new MessageDrivenContainer();
      int transType = bean.isContainerManagedTx() ? CMT : BMT;
View Full Code Here

   private StatelessSessionContainer createStatelessSessionContainer(SessionMetaData bean, DeploymentUnit unit)
         throws Exception
   {
      // get the container configuration for this bean
      // a default configuration is now always provided
      ConfigurationMetaData conf = bean.getContainerConfiguration();
      // Create container
      StatelessSessionContainer container = new StatelessSessionContainer();
      int transType = bean.isContainerManagedTx() ? CMT : BMT;
      initializeContainer(container, conf, bean, transType, unit);
      if (bean.getHome() != null || bean.getServiceEndpoint() != null)
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ConfigurationMetaData

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.