Package org.jboss.metadata

Examples of org.jboss.metadata.ConfigurationMetaData


   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

   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

         store.setContainer(c);
      }

      if(con != null)
      {
         ConfigurationMetaData configuration = con.getBeanMetaData().getContainerConfiguration();
         ejbStoreForClean = configuration.isEjbStoreForClean();
      }
   }
View Full Code Here

           throws Exception
   {

      try
      {
         ConfigurationMetaData configuration = container.getBeanMetaData().getContainerConfiguration();
         commitOption = configuration.getCommitOption();
         optionDRefreshRate = configuration.getOptionDRefreshRate();
      }
      catch(Exception e)
      {
         log.warn(e.getMessage());
      }
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

      removeEntitySQL = sql.toString();
      if(log.isDebugEnabled())
         log.debug("Remove SQL: " + removeEntitySQL);

      ConfigurationMetaData containerConfig = manager.getContainer().
         getBeanMetaData().getContainerConfiguration();
      syncOnCommitOnly = containerConfig.getSyncOnCommitOnly();

      JDBCCMRFieldBridge[] cmrFields = (JDBCCMRFieldBridge[]) entity.getCMRFields();
      for(int i = 0; i < cmrFields.length; ++i)
      {
         if(cmrFields[i].isBatchCascadeDelete())
View Full Code Here

/*     */
/*  77 */     this.removeEntitySQL = sql.toString();
/*  78 */     if (this.log.isDebugEnabled()) {
/*  79 */       this.log.debug("Remove SQL: " + this.removeEntitySQL);
/*     */     }
/*  81 */     ConfigurationMetaData containerConfig = manager.getContainer().getBeanMetaData().getContainerConfiguration();
/*     */
/*  83 */     this.syncOnCommitOnly = containerConfig.getSyncOnCommitOnly();
/*     */
/*  85 */     JDBCCMRFieldBridge[] cmrFields = (JDBCCMRFieldBridge[])(JDBCCMRFieldBridge[])this.entity.getCMRFields();
/*  86 */     for (int i = 0; i < cmrFields.length; i++)
/*     */     {
/*  88 */       if (!cmrFields[i].isBatchCascadeDelete())
View Full Code Here

/*      */
/*  134 */     this.schema = schema;
/*  135 */     this.tableId = tableId;
/*      */
/*  137 */     EntityMetaData entityMetaData = (EntityMetaData)entity.getContainer().getBeanMetaData();
/*  138 */     ConfigurationMetaData containerConf = entityMetaData.getContainerConfiguration();
/*  139 */     this.dontFlushCreated = containerConf.isInsertAfterEjbPostCreate();
/*      */
/*  142 */     Element cacheConf = containerConf.getContainerCacheConf();
/*  143 */     Element cachePolicy = cacheConf == null ? null : MetaData.getOptionalChild(cacheConf, "cache-policy-conf");
/*      */     int maxCapacity;
/*      */     int minCapacity;
/*      */     int maxCapacity;
/*  147 */     if (cachePolicy != null)
View Full Code Here

/*      */   }
/*      */
/*      */   private MessageDrivenContainer createMessageDrivenContainer(BeanMetaData bean, DeploymentUnit unit)
/*      */     throws Exception
/*      */   {
/*  661 */     ConfigurationMetaData conf = bean.getContainerConfiguration();
/*      */
/*  664 */     MessageDrivenContainer container = new MessageDrivenContainer();
/*  665 */     int transType = bean.isContainerManagedTx() ? 2 : 1;
/*      */
/*  667 */     initializeContainer(container, conf, bean, transType, unit);
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.