Examples of EJBContainer


Examples of org.apache.geronimo.openejb.EjbContainer

        EjbJarInfo ejbJarInfo = openEjbSystem.configureApplication(ejbModule);
        openEjbSystem.createEjbJar(ejbJarInfo, classLoader);
    }

    private void addEjbContainer(OpenEjbSystem openEjbSystem, String id, String type) throws Exception {
        EjbContainer ejbContainer = new EjbContainer();
        ejbContainer.setOpenEjbSystem(openEjbSystem);
        ejbContainer.setId(id);
        ejbContainer.setType(type);
        ejbContainer.doStart();
    }
View Full Code Here

Examples of org.glassfish.ejb.config.EjbContainer

    private void initProperties() {

        try {
           
            // Check for property settings from domain.xml
            EjbContainer ejbc = ejbContainerUtil.getEjbContainer();
            ejbt = ejbc.getEjbTimerService();

            if( ejbt != null ) {

                // If the system property com.sun.ejb.timer.ReadDBBeforeTimeout
                // is defined by the user use that the value of the flag
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

      {
         // TODO: EJBTHREE-1291
         return ejbRefResolver.getEjbContainer(businessIntf);
      }

      EJBContainer container = null;
      EndpointInfo endpoint = endpointResolver.getEndpointInfo(businessIntf, EndpointType.EJB, vfsContext);
      if(endpoint != null)
      {
         log.debug("Found endpoint for interface: "+businessIntf+", endpoint: "+endpoint);
         Ejb3Deployment deployment = deployments.get(endpoint.getPathName());
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

      {
         // TODO: EJBTHREE-1291
         return ejbRefResolver.getEjbContainer(ejbLink, businessIntf);
      }

      EJBContainer container = null;
      // First try the ejbLink
      EndpointInfo endpoint = endpointResolver.getEndpointInfo(ejbLink, EndpointType.EJB, vfsContext);
      if(endpoint != null)
      {
         log.debug("Found endpoint for ejbLink: "+ejbLink+", endpoint: "+endpoint);
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

   @Override
   protected void registerEJBContainer(Container container) throws Exception
   {
      // Add the jndi supplies
      MCDependencyPolicy dependsPolicy = (MCDependencyPolicy) container.getDependencyPolicy();
      EJBContainer ejbContainer = (EJBContainer) container;
      JBossEnterpriseBeanMetaData beanMD = ejbContainer.getXml();

      ContainerDependencyMetaData cdmd = null;
      if(endpoints != null)
      {
         String ejbKey = "ejb/" + jbossUnit.getRelativePath() + "#" + container.getEjbName();
         cdmd = endpoints.get(ejbKey);
      }
      else
      {
         log.warn(jbossUnit+" has no ContainerDependencyMetaData attachment");
      }

      if(cdmd != null)
      {
         for(String jndiName : cdmd.getJndiNames())
         {
         String supplyName = JNDIKernelRegistryPlugin.JNDI_DEPENDENCY_PREFIX + jndiName;
         AbstractSupplyMetaData supply = new AbstractSupplyMetaData(supplyName);
         dependsPolicy.getSupplies().add(supply);
         }
      }

      // EJBTHREE-1335: container name in meta data
      generateContainerName(container, beanMD);
     
      // setup switchboard
      Barrier switchBoard = this.getSwitchBoardBarrier(container);
      // the container cannot function without an SwitchBoard Barrier
      if (switchBoard == null)
      {
         throw new RuntimeException("No SwitchBoard Barrier found for bean: " + container.getEjbName() + " in unit: "
               + this.jbossUnit + " (or its component deployment unit)");
      }
      // add dependency on START (and not INSTALLED) state of Switchboard, since the container only requires a fully populated ENC context,
      // but doesn't require a invokable context. An invokable context is only needed by Injector.
      dependsPolicy.addDependency(this.createSwitchBoardDependency(ejbContainer, switchBoard));
      log.debug("Added dependency on Switchboard " + switchBoard.getId() + " for EJB container " + ejbContainer.getName());
     
     
      // create and setup Injector(s) for InjectionManager 
      InjectionManager injectionManager = this.getInjectionManager(container);
      // the container cannot function without an InjectionManager
      if (injectionManager == null)
      {
         throw new RuntimeException("No InjectionManager found for bean: " + container.getEjbName() + " in unit: "
               + this.jbossUnit + " (or its component deployment unit)");
      }
      // setup the injectors for the bean and any of its interceptors
      this.setupInjectors(ejbContainer, injectionManager, switchBoard);
      // set the InjectionManager on the EJBContainer
      ejbContainer.setInjectionManager(injectionManager);
     
      super.registerEJBContainer(container);
   }
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

         log.info("\t" + smd.getSupply());
      }

      if(service instanceof EJBContainer)
      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
            BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(encFactoryBeanName, NamingComponentEjbEncFactory.class.getName());
            String componentBeanName = "jboss.naming:" + scopedBeanName;
            builder.addConstructorParameter(JavaEEComponent.class.getName(), new AbstractInjectionValueMetaData(componentBeanName));
            // TODO: is deployment always available at this stage?
            deployment.getBeanFactories().add(builder.getBeanMetaDataFactory());
         }
         // modify the container bean meta data to inject the EjbEncFactory
         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(bean);
         //builder.addPropertyMetaData("namingComponent", new AbstractInjectionValueMetaData("java:comp"));
         builder.addPropertyMetaData("ejbEncFactory", new AbstractInjectionValueMetaData(encFactoryBeanName));
        
         // Add the BeanInstantiator injection into EJBContainer
         // TODO: (Jaikiran) Terrible hack! Use JavaEEComponentInformer to get the app name.
         // But for now, due to lack of time for 6.0.0.CR1 release, let's just use this hack
         if (appName == null)
         {
            appName = moduleName;
         }
         String beanInstantiatorMcName = BeanInstantiatorRegistration.getInstantiatorRegistrationName(appName, moduleName, container.getEjbName());
         builder.addPropertyMetaData("beanInstantiator", new AbstractInjectionValueMetaData(beanInstantiatorMcName));

         // ahem
         if(service instanceof StatelessContainer)
         {
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

      }
   }

   public Context getJNDIContext(final Endpoint ep) throws NamingException
   {
      final EJBContainer ejb3Container = (EJBContainer) getEjb3Container();
      return (Context) ejb3Container.getEnc().lookup(EJB3_JNDI_PREFIX);
   }
View Full Code Here

Examples of org.jboss.ejb3.EJBContainer

            final String ejbName = ejbMD.determineContainerName();

            if (ejbMD.getEjbClass() != null)
            {
               this.log.debug("Creating webservice EJB adapter for: " + ejbName);
               final EJBContainer ejbContainer = this.getContainer(ejb3Deployment, ejbMD);
               endpoints.add(new WebServiceDeclarationAdapter(ejbMD, ejbContainer, unit.getClassLoader()));
            }
            else
            {
               this.log.warn("Ingoring EJB deployment with null classname: " + ejbName);
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.