Examples of EJBContainer


Examples of org.jboss.ejb3.EJBContainer

  
   abstract protected Handle createHandle();
  
   protected HomeHandle getHomeHandle()
   {
      EJBContainer ejbContainer = (EJBContainer)container;
     
      HomeHandleImpl homeHandle = null;
     
      RemoteBinding remoteBindingAnnotation = ejbContainer.getAnnotation(RemoteBinding.class);
      if (remoteBindingAnnotation != null)
         homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(container));
     
      return homeHandle;
   }
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

      Class<?> remote = null;
      Class<?> home = null;
      Class<?> pkClass = Object.class;
      HomeHandleImpl homeHandle = null;
     
      EJBContainer ejbContainer = (EJBContainer)container;
     
      Class<?>[] remotes = ProxyFactoryHelper.getRemoteInterfaces(this.getContainer());
      if (remotes != null && remotes.length > 0)
      {
         remote = remotes[0];
      }
      RemoteHome homeAnnotation = ejbContainer.getAnnotation(RemoteHome.class);
      if (homeAnnotation != null)
         home = homeAnnotation.value();
      RemoteBinding remoteBindingAnnotation = ejbContainer.getAnnotation(RemoteBinding.class);
      if (remoteBindingAnnotation != null)
         homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding());
     
      EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);
     
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

   }

  
   protected void validateEjb21Views(){
     
      EJBContainer container = this.getContainer();
     
      LocalHome localHome = container.getAnnotation(LocalHome.class);
     
      // Ensure that if EJB 2.1 Components are defined, they're complete
      this.validateEjb21Views(localHome == null ? null : localHome.value(), ProxyFactoryHelper
            .getLocalInterfaces(container));
   }
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

    * @see org.jboss.aop.advice.AspectFactory#createPerClass(org.jboss.aop.Advisor)
    */
   public Object createPerClass(final Advisor advisor)
   {
      // Get the container
      final EJBContainer container = EJBContainer.getEJBContainer(advisor);

      // Get the metadata
      final JBossEnterpriseBeanMetaData md = container.getXml();

      // Create the interceptor instance
      AsyncMethodsMetaData asyncMethods = this.getAsyncMethods(md);
      if (asyncMethods == null)
      {
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

      // Get the current invocation ID
      final AsyncInvocationId id = CurrentAsyncInvocation.getCurrentAsyncInvocationId(invocation);

      // Get at the current invocations via the container
      final Advisor advisor = invocation.getAdvisor();
      final EJBContainer ejbContainer = EJBContainer.getEJBContainer(advisor);
      if (ejbContainer instanceof ServiceContainer || ejbContainer instanceof MessagingContainer)
      {
         return invocation.invokeNext();
      }
      final SessionSpecContainer sessionContainer = (SessionSpecContainer) EJBContainer.getEJBContainer(advisor);
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

   {
      this.container = (StatefulContainer) container;
      Advisor advisor = container.getAdvisor();
      cacheMap = new CacheMap();
      PersistenceManager pmConfig = (PersistenceManager) advisor.resolveAnnotation(PersistenceManager.class);
      EJBContainer ejbContainer = (EJBContainer)container;
      String pmConfigValue = pmConfig.value();
      PersistenceManagerFactoryRegistry pmFactoryRegistry = ejbContainer.getDeployment()
            .getPersistenceManagerFactoryRegistry();
      PersistenceManagerFactory pmFactory = pmFactoryRegistry.getPersistenceManagerFactory(pmConfigValue);
      this.pm = pmFactory.createPersistenceManager();
      pm.initialize(container);
      CacheConfig config = (CacheConfig) advisor.resolveAnnotation(CacheConfig.class);
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

     
      MockEjb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
      Ejb3DescriptorHandler handler = new Ejb3DescriptorHandler(deployment, metaData);
      List<Container> containers = handler.getContainers(deployment, new HashMap<String, Container>());
     
      EJBContainer container = (EJBContainer) containers.get(0);
      Stateful annotation = ((EJBContainer) containers.get(0)).getAnnotation(Stateful.class);
      assertNotNull("Can't find annotation @Stateful on the container", annotation);
     
      //ApplicationException ex = container.getAnnotation(ApplicationException.class, DummyException.class);
      ApplicationException ex = ExtendedAdvisorHelper.getExtendedAdvisor(container.getAdvisor()).resolveAnnotation(DummyException.class, ApplicationException.class);
      assertNotNull("Can't find annotation @ApplicationException in the meta data", ex);
   }
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

     
      MockEjb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
      Ejb3DescriptorHandler handler = new Ejb3DescriptorHandler(deployment, metaData);
      List<Container> containers = handler.getContainers(deployment, new HashMap<String, Container>());
     
      EJBContainer container = (EJBContainer) containers.get(0);
      Stateful annotation = ((EJBContainer) containers.get(0)).getAnnotation(Stateful.class);
      assertNotNull("Can't find annotation @Stateful on the container", annotation);
     
      assertFalse("Stateful bean incorrectly has been marked with " + SerializedConcurrentAccess.class.getName()
            + " annotation", container.getAdvisor().hasAnnotation(SerializedConcurrentAccess.class.getName()));
   }
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

      container.getEncInjectors().put(encName, injector);
   }

   public static EJBContainer getEjbContainer(EJB ref, InjectionContainer container, Class<?> memberType)
   {
      EJBContainer rtn = null;

      if (ref.mappedName() != null && !"".equals(ref.mappedName()))
      {
         return null;
      }
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

      // Get the current invocation ID
      final AsyncInvocationId id = CurrentAsyncAOPInvocation.getCurrentAsyncInvocationId(invocation);

      // Get at the current invocations via the container
      final Advisor advisor = invocation.getAdvisor();
      final EJBContainer ejbContainer = EJBContainer.getEJBContainer(advisor);
      if (ejbContainer instanceof ServiceContainer || ejbContainer instanceof MessagingContainer)
      {
         return invocation.invokeNext();
      }
      final SessionSpecContainer sessionContainer = (SessionSpecContainer) EJBContainer.getEJBContainer(advisor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.