Package org.jboss.ejb3.endpoint

Examples of org.jboss.ejb3.endpoint.Endpoint


      try
      {
         // first push the context corresponding to the endpoint to INSTALLED
         this.endpointContext.getController().change(this.endpointContext, ControllerState.INSTALLED);
         // get hold of the endpoint from its context
         Endpoint endpoint = (Endpoint) this.endpointContext.getTarget();
         return endpoint;
      }
      catch (Throwable t)
      {
         throw new RuntimeException("Error getting endpoint out of container KernelControllerContext "
View Full Code Here


      // now get hold of the StatefulSessionFactory from the context
      Object target = this.endpointContext.getTarget();
      assert target instanceof Endpoint : "Unexpected object type found " + target + " - expected a " + Endpoint.class;

      Endpoint endpoint = (Endpoint) target;
      if (!endpoint.isSessionAware())
      {
         throw new IllegalStateException("Endpoint " + endpoint
               + " is not session aware. Cannot be used for Stateful no-interface view(s)");
      }

      // create the session
      Serializable session = endpoint.getSessionFactory().createSession(null, null);
      logger.debug("Created session " + session + " for " + this.beanClass);

      // create an invocation handler
      InvocationHandler invocationHandler = new NoInterfaceViewInvocationHandler(this.endpointContext, session);
View Full Code Here

      {
         throw new javax.ejb.EJBException("Cannot invoke method " + method.getName() + " on nointerface view");
      }

      // get the endpoint (which will involve pushing it to INSTALLED state)
      Endpoint endpoint = getInstalledEndpoint();
      assert endpoint != null : "No endpoint associated with context " + this.endpointContext
            + " - cannot invoke the method on bean";

      // finally pass-on the control to the endpoint
      return endpoint.invoke(this.session, this.businessInterface, method, args);
   }
View Full Code Here

         // EJBTHREE-2166 - Changing state through MC API won't work. So for now,
         // we are going to rely on an already INSTALLED endpoint context
//         this.endpointContext.getController().change(this.endpointContext, ControllerState.INSTALLED);
        
         // get hold of the endpoint from its context
         Endpoint endpoint = (Endpoint) this.endpointContext.getTarget();
         return endpoint;
      }
      catch (Throwable t)
      {
         throw new RuntimeException("Error getting endpoint out of container KernelControllerContext "
View Full Code Here

      @Deprecated
      Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();

      // Get the resolver
      EndpointResolver resolver = registrar.lookup(MC_BIND_NAME_ENDPOINT_RESOLVER, EndpointResolver.class);
      this.ejbClassName = descriptor.getBeanClass().getSimpleName();
      endpointMcBindName = resolver.resolve(deploymentUnit, ejbClassName);
      this.stateful = descriptor.isStateful();
   }
View Full Code Here

         if(service instanceof StatelessContainer)
         {
            ((StatelessContainer) service).setBusinessObjectFactory(new EJB31StatelessBusinessObjectFactory());
         }
         if(service instanceof StatefulContainer)
            ((StatefulContainer) service).setBusinessObjectFactory(new EJB31StatefulBusinessObjectFactory(kernel));
      }

      if(unit != null)
      {
         // Just add the mc bean metadata to the unit
View Full Code Here

         builder.addPropertyMetaData("beanInstantiator", new AbstractInjectionValueMetaData(beanInstantiatorMcName));

         // ahem
         if(service instanceof StatelessContainer)
         {
            ((StatelessContainer) service).setBusinessObjectFactory(new EJB31StatelessBusinessObjectFactory());
         }
         if(service instanceof StatefulContainer)
            ((StatefulContainer) service).setBusinessObjectFactory(new EJB31StatefulBusinessObjectFactory(kernel));
      }
View Full Code Here

      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

      }
      this.asynchronousProcessor = es;
     
      // Get the Bean Instantiator
      final String beanInstantiatorAttachmentName = AttachmentNames.NAME_BEAN_INSTANCE_INSTANTIATOR;
      final BeanInstantiator beanInstantiator = (BeanInstantiator) unit.getAttachment(beanInstantiatorAttachmentName);
      if (beanInstantiator == null)
      {
         throw new IllegalStateException(unit + " must contain an attachment of name " + beanInstantiatorAttachmentName);
      }
      this.beanInstantiator = beanInstantiator;
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

TOP

Related Classes of org.jboss.ejb3.endpoint.Endpoint

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.