Package org.jboss.ejb3.stateful

Examples of org.jboss.ejb3.stateful.StatefulContainer


      this.addInput(JBossMetaData.class);
      this.addOutput(BeanInstantiator.class);
      jsr299BeanInstantiatorDeployer = new Jsr299BeanInstantiatorDeployer();
      jsr299BeanInstantiatorDeployer.setKernel(kernel);
      jsr299BeanInstantiatorDeployer.setJavaEEComponentInformer(javaEEComponentInformer);
      singletonBeanInstantiatorDeployer = new SingletonBeanInstantiatorDeployer(defaultBeanInstantiator);
      singletonBeanInstantiatorDeployer.setKernel(kernel);
      singletonBeanInstantiatorDeployer.setJavaEEComponentInformer(javaEEComponentInformer);
   }
View Full Code Here


      assert unit != null : "unit is null";
      assert classLoader != null : "classLoader is null";
     
      this.unit = unit;
      this.classLoader = classLoader;
      this.interceptorInfoRepository = new InterceptorInfoRepository(classLoader);
   }
View Full Code Here

   @Override
   public JavaEEApplication getApplication()
   {
      // getApplication must return null if there is no ear
      JavaEEApplication app = super.getApplication();
      if(((JBoss5DeploymentScope) app).isEar())
         return app;
      return null;
   }
View Full Code Here

      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
            BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(encFactoryBeanName, NamingComponentEjbEncFactory.class.getName());
View Full Code Here

      if(service instanceof EJBContainer)
      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
View Full Code Here

*/
public class ClientJavaEEComponent extends AbstractJavaEEComponent
{
   public ClientJavaEEComponent(String clientName)
   {
      super(new SimpleJavaEEModule(clientName));
   }
View Full Code Here

   private PersistenceUnitDependencyResolver persistenceUnitDependencyResolver;

   public ClientENCInjectionContainer(VFSDeploymentUnit unit, JBossClientMetaData xml, Class<?> mainClass, String applicationClientName, ClassLoader classLoader,
         Context encCtx, PersistenceUnitDependencyResolver persistenceUnitDependencyResolver) throws NamingException
   {
      super(new SimpleJavaEEModule((unit.getParent() != null ? unit.getParent().getSimpleName() : null), unit.getSimpleName()));
      if (mainClass == null)
         throw new NullPointerException("mainClass is mandatory");
      if (applicationClientName == null)
         throw new NullPointerException("applicationClientName is mandatory");
      if (classLoader == null)
View Full Code Here

      {
         this.id = null;
      }
      else
      {
         SessionProxyInvocationHandler handler = (SessionProxyInvocationHandler) Proxy.getInvocationHandler(reference);
         id = (Serializable) handler.getTarget();
      }

      @Deprecated
      Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
View Full Code Here

            }
            break;
         case SFSB :
            try
            {
               container = new StatefulContainer(loader, beanClassName, ejbName, domain, ctxProperties, deployment, md);
            }
            catch (ClassNotFoundException cnfe)
            {
               throw new RuntimeException("Could not create SLSB Container for " + beanClassName, cnfe);
            }
View Full Code Here

      Domain domain = getDomain("Stateful Bean");
      Hashtable<?,?> ctxProperties = null;
      Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
      deployment.setPersistenceManagerFactoryRegistry(getBootstrap().lookup("EJB3PersistenceManagerFactoryRegistry", PersistenceManagerFactoryRegistry.class));
      JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(MyStatefulBean.class);
      StatefulContainer container = new StatefulContainer(cl, beanClassname, ejbName, domain, ctxProperties, deployment, beanMetaData);
     
      // TODO: wickedness
      container.instantiated();
     
      // A container does not register itself
      Ejb3Registry.register(container);
     
      // Register the Container in ObjectStore (MC)
      String containerName = container.getObjectName().getCanonicalName();
//      AbstractBeanMetaData bmd = new AbstractBeanMetaData(containerName, StatefulContainer.class.getName());
//      KernelControllerContext context = getBootstrap().getKernel().getController().install(bmd, container);
//      if(context.getError() != null)
//         throw context.getError();
      Ejb3RegistrarLocator.locateRegistrar().bind(containerName, container);
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.stateful.StatefulContainer

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.