Package org.jboss.ejb3

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


      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

public class CachedConnectionInterceptorFactory extends AbstractInterceptorFactory
{
   @Override
   public Object createPerClass(Advisor advisor)
   {
      EJBContainer container = EJBContainer.getEJBContainer(advisor);
      Set<String> unsharableResources = new HashSet<String>();
      JBossEnterpriseBeanMetaData metaData = container.getXml();
      ResourceReferencesMetaData resRefs = metaData.getResourceReferences();
      if(resRefs != null)
      {
         for(ResourceReferenceMetaData resRef : resRefs)
         {
View Full Code Here

  
   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

      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

      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

   }

  
   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

   {
      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

      List<WebServiceDeclaration> container = new ArrayList<WebServiceDeclaration>();

      Iterator<Container> it = ejb3Deployment.getEjbContainers().values().iterator();
      while(it.hasNext())
      {
         final EJBContainer c = (EJBContainer)it.next();
         container.add(
           new WebServiceDeclaration()
           {

              public <T extends java.lang.annotation.Annotation> T getAnnotation(Class<T> t)
              {
                 return c.getAnnotation(t);
              }


              public String getComponentName()
              {
                 return c.getEjbName();
              }

              public String getComponentClassName()
              {
                 return c.getBeanClassName()
              }
           }

         );
      }
View Full Code Here

        
         Iterator<JBossEnterpriseBeanMetaData> iterator = beans.getEnterpriseBeans().iterator();
         while(iterator.hasNext())
         {
            JBossEnterpriseBeanMetaData ejb = iterator.next();
            EJBContainer ejbContainer = null;
            if (ejb3Deployment != null && !ejb.isEntity())
            {
               ObjectName objName = null;
               try
               {
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.EJBContainer

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.