Package org.jboss.metadata.ejb.jboss

Examples of org.jboss.metadata.ejb.jboss.JBossSessionBean31MetaData


   private AccessTimeoutEffigy findAccessTimeout(Method method)
   {
      AccessTimeoutMetaData accessTimeout = null;
      // best match
      JBossSessionBean31MetaData beanMetaData = getBeanMetaData();
      String params[] = params(method);
      ConcurrentMethodsMetaData concurrentMethods = beanMetaData.getConcurrentMethods();
      if(concurrentMethods != null)
      {
         ConcurrentMethodMetaData concurrentMethodMetaData = concurrentMethods.bestMatch(method.getName(), params);
         if(concurrentMethodMetaData != null)
         {
            // the concurrent-method might only contain a lock element, not an access-timeout
            accessTimeout = concurrentMethodMetaData.getAccessTimeout();
         }
      }
      if(accessTimeout == null)
         accessTimeout = beanMetaData.getAccessTimeout();
      return accessTimeout(accessTimeout);
   }
View Full Code Here


   @Override
   protected Set<Class<?>> getAllViews(ClassLoader cl)
   {
      Set<Class<?>> views = super.getAllViews(cl);
      // check if it has a no-interface view
      JBossSessionBean31MetaData sessionBean = this.getBeanMetaData();
      if (sessionBean.isNoInterfaceBean())
      {
         if (views == null)
         {
            views = new HashSet<Class<?>>();
         }
View Full Code Here

      {
         throw new IllegalStateException("No async executor available for deployment unit " + unit);
      }
     
      // now start with actual processing
      JBossSessionBean31MetaData singletonBean = (JBossSessionBean31MetaData) beanMetaData;

      // Create a singleton container
      ClassLoader classLoader = unit.getClassLoader();
      String domainName = AOPBasedSingletonContainer.getAOPDomainName();
      DomainDefinition singletonContainerAOPDomain = AspectManager.instance().getContainer(domainName);
      if (singletonContainerAOPDomain == null)
      {
         throw new DeploymentException(domainName + " AOP domain not configured - cannot deploy EJB named "
               + beanMetaData.getEjbName() + " in unit " + unit);
      }
      Hashtable<String, String> ctxProperties = new Hashtable<String, String>();
      AOPBasedSingletonContainer singletonContainer;
      try
      {
         singletonContainer = new AOPBasedSingletonContainer(classLoader, singletonBean.getEjbClass(), singletonBean
               .getEjbName(), (Domain) singletonContainerAOPDomain.getManager(), ctxProperties, singletonBean, unit, asyncExecutorService);
      }
      catch (ClassNotFoundException cnfe)
      {
         throw new DeploymentException(cnfe);
      }

      // EJBTHREE-2106 https://jira.jboss.org/browse/EJBTHREE-2106
      // One more of those mysterious security integration params.
      // We set the JaccContextId to the simple name of the Deployment unit (don't ask why)
      // It's "copied" from the current implementation in Ejb3AnnotationHandler.getJaccContextId()
      singletonContainer.setJaccContextId(unit.getSimpleName());

      singletonContainer.setEjbReferenceResolver(this.ejbReferenceResolver);
      singletonContainer.setMessageDestinationResolver(this.messageDestinationResolver);
      singletonContainer.setPersistenceUnitResolver(this.puResolver);

      singletonContainer.instantiated();

      // TODO: This will go once fully integrated with SwitchBoard
      singletonContainer.processMetadata();

      // attach the container to the deployment unit, with appropriate MC dependencies
      this.attachContainerBMD(unit, singletonContainer.getObjectName().getCanonicalName(), singletonContainer);

      //
      if (singletonBean.isInitOnStartup())
      {
         StartupSingletonInitiator startupSingletonInitiator = new StartupSingletonInitiator(singletonContainer);
         this.attachStartupSingletonInitiatorBMD(startupSingletonInitiator, singletonContainer, unit);
      }
   }
View Full Code Here

         }
         return false;
      }

      // now start with actual processing
      JBossSessionBean31MetaData sessionBean = (JBossSessionBean31MetaData) beanMetaData;
      // we are only concerned with Singleton beans
      if (!sessionBean.isSingleton())
      {
         if (logger.isTraceEnabled())
         {
            logger.trace("Not a singleton bean " + sessionBean.getName());
         }
         return false;
      }
      // it's a singleton bean
      return true;
View Full Code Here

      // add EEInjector to InjectionManager
      this.setupInjectors(unit, container, injectionManager, switchBoard);
     
      // Process @DependsOn/depends-on
      // Add any dependencies based on @DependsOn/depends-on elements
      JBossSessionBean31MetaData sessionBeanMetaData = (JBossSessionBean31MetaData) container.getMetaData();
      String[] dependsOn = sessionBeanMetaData.getDependsOn();
      if (dependsOn != null)
      {
         AbstractListMetaData containerDependencies = new AbstractListMetaData();
         EjbLinkResolver ejbLinkResolver = new EjbLinkResolver();
         for (String dependency : dependsOn)
View Full Code Here

      JBossSessionBeanMetaData sessionBean = (JBossSessionBeanMetaData) enterpriseBean;
      if (sessionBean instanceof JBossSessionBean31MetaData == false)
      {
         return;
      }
      JBossSessionBean31MetaData sessionBean31 = (JBossSessionBean31MetaData) sessionBean;
      if (!sessionBean31.isSingleton())
      {
         return;
      }
      process(unit, sessionBean31, container);
View Full Code Here

      // (ugly) check
      if (!(enterpriseBean instanceof JBossSessionBean31MetaData))
      {
         return false;
      }
      JBossSessionBean31MetaData sessionBean = (JBossSessionBean31MetaData) enterpriseBean;
      if (!sessionBean.isSingleton())
      {
         return false;
      }
      if (!sessionBean.isInitOnStartup())
      {
         return false;
      }
      return true;
   }
View Full Code Here

      }

      // If EJB 3.1
      if (session instanceof JBossSessionBean31MetaData)
      {
         final JBossSessionBean31MetaData session31 = (JBossSessionBean31MetaData) session;
         asyncMethods = session31.getAsyncMethods();
         if (asyncMethods == null)
         {
            asyncMethods = new AsyncMethodsMetaData();
         }
      }
View Full Code Here

      if (asyncExecutorService == null)
      {
         throw new IllegalStateException("No async executor available for deployment unit " + unit);
      }
      // now start with actual processing
      JBossSessionBean31MetaData sessionBean = (JBossSessionBean31MetaData) beanMetaData;

      // Create a singleton container
      ClassLoader classLoader = unit.getClassLoader();
      String domainName = AOPBasedSingletonContainer.getAOPDomainName();
      DomainDefinition singletonContainerAOPDomain = AspectManager.instance().getContainer(domainName);
      if (singletonContainerAOPDomain == null)
      {
         throw new DeploymentException(domainName + " AOP domain not configured - cannot deploy EJB named "
               + beanMetaData.getEjbName() + " in unit " + unit);
      }
      Hashtable<String, String> ctxProperties = new Hashtable<String, String>();
      AOPBasedSingletonContainer singletonContainer;
      try
      {
         singletonContainer = new AOPBasedSingletonContainer(classLoader, sessionBean.getEjbClass(), sessionBean
               .getEjbName(), (Domain) singletonContainerAOPDomain.getManager(), ctxProperties, sessionBean, unit, asyncExecutorService);
      }
      catch (ClassNotFoundException cnfe)
      {
         throw new DeploymentException(cnfe);
      }

      singletonContainer.setEjbReferenceResolver(this.ejbReferenceResolver);
      singletonContainer.setMessageDestinationResolver(this.messageDestinationResolver);
      singletonContainer.setPersistenceUnitResolver(this.puResolver);

      singletonContainer.instantiated();

      singletonContainer.processMetadata();
      // register the container with Ejb3Registry and also store reference locally (for use during
      // undeploy)
      this.registerContainer(sessionBean.getContainerName(), singletonContainer);

      // attach the container to the deployment unit, with appropriate MC dependencies
      this.installContainer(unit, singletonContainer.getObjectName().getCanonicalName(), singletonContainer);

   }
View Full Code Here

         }
         return false;
      }

      // now start with actual processing
      JBossSessionBean31MetaData sessionBean = (JBossSessionBean31MetaData) beanMetaData;
      // we are only concerned with Singleton beans
      if (!sessionBean.isSingleton())
      {
         if (logger.isTraceEnabled())
         {
            logger.trace("Not a singleton bean " + sessionBean.getName());
         }
         return false;
      }
      // it's a singleton bean
      return true;
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ejb.jboss.JBossSessionBean31MetaData

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.