Package org.jboss.ejb3

Examples of org.jboss.ejb3.EJBContainer$SemaphoreLock


   }

  
   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


    * @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

      // 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

   {
      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

     
      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

     
      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

      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

      // 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

      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

      {
         log.warn("TIMER SERVICE IS NOT INSTALLED");
         return;
      }
      TimerServiceFacade timerService = (TimerServiceFacade) aTimerService;
      EJBContainer container = timerService.getContainer();
      // FIXME: do not assume that a TimedObjectInvoker is an EJBContainer
      ClassLoader loader = container.getClassloader();
     
      // FIXME: A hack to circumvent the check in TimerServiceFacade
      // In AS itself (/EJB2) the container has an unsecured timer service association
      // see org.jboss.ejb.Container.getTimerService(Object pKey)
      AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsAssociation.IN_BUSINESS_METHOD);
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.EJBContainer$SemaphoreLock

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.