Package org.jboss.metadata.ejb.jboss

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


      DependencyPolicy containerDependencyPolicy = container.getDependencyPolicy();

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

      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

      {
         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

      List<TimerMetaData> autoTimersMetaData = null;

      if (enterpriseBeanMetaData.isSession() && enterpriseBeanMetaData instanceof JBossSessionBean31MetaData)
      {
         JBossSessionBean31MetaData sessionBean = (JBossSessionBean31MetaData) enterpriseBeanMetaData;
         // Stateful beans don't have timerservice/timers
         if (sessionBean.isStateful())
         {
            return;
         }
         // Get hold of the auto timer metadata
         autoTimersMetaData = sessionBean.getTimers();
      }
      else if (enterpriseBeanMetaData.isMessageDriven()
            && enterpriseBeanMetaData instanceof JBossMessageDrivenBean31MetaData)
      {
         JBossMessageDrivenBean31MetaData mdb = (JBossMessageDrivenBean31MetaData) enterpriseBeanMetaData;
View Full Code Here

   private <B> B createNoInterfaceBusinessObject(SessionContainer container, Serializable sessionId, Class<B> businessInterface)
           throws NamingException
   {
      // we have determined it's the no-interface, let's hack

      JBossSessionBean31MetaData beanMetaData = (JBossSessionBean31MetaData) container.getMetaData();
      // get no-interface view jndi name
      String noInterfaceJndiName = this.getJNDINameResolver(beanMetaData).resolveNoInterfaceJNDIName(beanMetaData);
      return businessInterface.cast(container.getInitialContext().lookup(noInterfaceJndiName));
   }
View Full Code Here

     
      JBossSessionBeanMetaData beanMetaData = container.getMetaData();
      if(!(beanMetaData instanceof JBossSessionBean31MetaData))
         return ViewType.UNKNOWN;

      JBossSessionBean31MetaData sessionBean31MetaData = (JBossSessionBean31MetaData) beanMetaData;
      if(!sessionBean31MetaData.isNoInterfaceBean())
         return ViewType.UNKNOWN;

      return ViewType.NO_INTERFACE;
   }
View Full Code Here

     
      JBossSessionBeanMetaData beanMetaData = container.getMetaData();
      if(!(beanMetaData instanceof JBossSessionBean31MetaData))
         return ViewType.UNKNOWN;

      JBossSessionBean31MetaData sessionBean31MetaData = (JBossSessionBean31MetaData) beanMetaData;
      if(!sessionBean31MetaData.isNoInterfaceBean())
         return ViewType.UNKNOWN;

      // it could still be an unknown view, make sure it's the no-interface view
      if(intf.equals(container.getBeanClass()))
         return ViewType.NO_INTERFACE;
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.