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; initializeContainer(container, conf, bean, transType, unit); createProxyFactories(bean, container); container.setInstancePool(createInstancePool(conf, unit.getClassLoader())); return container; }
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) { createProxyFactories(bean, container); } container.setInstancePool(createInstancePool(conf, unit.getClassLoader())); return container; }
if (bean.getHome() != null) createProxyFactories(bean, container);
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; }