Package org.jboss.ejb3.jndi.deployers.resolver

Examples of org.jboss.ejb3.jndi.deployers.resolver.EJBBinderResolutionResult


      {
         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());
View Full Code Here


      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
         {
View Full Code Here

*/
public class ClientJavaEEComponent extends AbstractJavaEEComponent
{
   public ClientJavaEEComponent(String clientName)
   {
      super(new SimpleJavaEEModule(clientName));
   }
View Full Code Here

   private PersistenceUnitDependencyResolver persistenceUnitDependencyResolver;

   public ClientENCInjectionContainer(VFSDeploymentUnit unit, JBossClientMetaData xml, Class<?> mainClass, String applicationClientName, ClassLoader classLoader,
         Context encCtx, PersistenceUnitDependencyResolver persistenceUnitDependencyResolver) throws NamingException
   {
      super(new SimpleJavaEEModule((unit.getParent() != null ? unit.getParent().getSimpleName() : null), unit.getSimpleName()));
      if (mainClass == null)
         throw new NullPointerException("mainClass is mandatory");
      if (applicationClientName == null)
         throw new NullPointerException("applicationClientName is mandatory");
      if (classLoader == null)
View Full Code Here

   }

   public TomcatInjectionContainer(WebApplication appInfo, DeploymentUnit unit, org.apache.catalina.Context catalinaContext,
         PersistenceUnitDependencyResolver resolver, Set<String> dynamicClassLoaders, JavaEEComponent component, InjectionManager injectionManager)
   {
      super(new SimpleJavaEEModule(appInfo.getName()));

      assert component != null : "component is null";

      this.unit = unit;
      this.appInfo = appInfo;
View Full Code Here

      // get the bean interface type
      String beanInterface = this.getBeanInterfaceType(unit.getClassLoader(), annotatedEjbRef);
      // create the EJB reference to resolve
      EJBReference ejbReference = new EJBReference(unit, annotatedEjbRef.getBeanName(), beanInterface, annotatedEjbRef.getMappedName(), annotatedEjbRef.getLookupName());
      // resolve using the EJBBinder resolver
      EJBBinderResolutionResult result = this.ejbBinderResolver.resolveEJBBinder(unit, ejbReference);
     
      // throw error, if we can't resolve
      if (result == null)
      {
         throw new RuntimeException("Could not resolve @EJB reference: " + ejbReference + " for environment entry: "
               + annotatedEjbRef.getName() + " in unit " + unit);
      }
     
      // get the invocation dependencies
      Collection<?> invocationDependencies = this.getInvocationDependencies(result);
      // return the resource
      return new EJBRefResource(result.getJNDIName(), result.getEJBBinderName(), invocationDependencies);
   }
View Full Code Here

      // get the bean interface type
      String beanInterface = this.getBeanInterfaceType(unit.getClassLoader(), ejbLocalRef);
      // create a EJB reference
      EJBReference ejbReference = new EJBReference(unit, ejbLocalRef.getLink(), beanInterface, ejbLocalRef.getMappedName(), ejbLocalRef.getLookupName());
      // resolve
      EJBBinderResolutionResult result = this.ejbBinderResolver.resolveEJBBinder(unit, ejbReference);
      // throw an error, if we couldn't resolve the reference
      if (result == null)
      {
         throw new RuntimeException("Could not resolve ejb-local-ref reference: " + ejbReference + " for environment entry: " + ejbLocalRef.getName() + " in unit " + unit);
      }
      // The EJBBinder might not be available (for example, EJB2.x Entity beans). In such
      // cases, just create a LinkRefResource for the resolved jndi name
      if (result.getEJBBinderName() == null)
      {
         return new LinkRefResource(result.getJNDIName(), null, true);
      }
      // get the invocation dependencies
      Collection<?> invocationDependencies = this.getInvocationDependencies(result);
      // return the resource
      return new EJBRefResource(result.getJNDIName(), result.getEJBBinderName(), invocationDependencies);

   }
View Full Code Here

      // get the bean interface type
      String beanInterface = this.getBeanInterfaceType(unit.getClassLoader(), ejbRef);
      // create the EJB reference
      EJBReference reference = new EJBReference(unit, ejbRef.getLink(), beanInterface, ejbRef.getMappedName(), ejbRef.getLookupName());
      // resolve
      EJBBinderResolutionResult result = this.ejbBinderResolver.resolveEJBBinder(unit, reference);
      // thrown an error, if we couldn't resolve the reference
      if (result == null)
      {
         throw new RuntimeException("Could not resolve ejb-ref reference: " + reference + " for environment entry: " + ejbRef.getName() + " in unit " + unit);
      }
      // The EJBBinder might not be available (for example, EJB2.x Entity beans). In such
      // cases, just create a LinkRefResource for the resolved jndi name
      if (result.getEJBBinderName() == null)
      {
         return new LinkRefResource(result.getJNDIName(), null, true);
      }
      // get the invocation dependencies
      Collection<?> invocationDependencies = this.getInvocationDependencies(result);
      // return the resource
      return new EJBRefResource(result.getJNDIName(), result.getEJBBinderName(), invocationDependencies);
   }
View Full Code Here

      if(result instanceof JBossGenericBeanMetaData)
      {
         log.warn("FIXME: EJBTHREE-1227: JBossGenericBeanMetaData found for '" + ejbName + "' instead of " + enterpriseBeanMetaDataClass);
         if(enterpriseBeanMetaDataClass.equals(JBossSessionBeanMetaData.class))
         {
            result = new JBossSessionGenericWrapper((JBossGenericBeanMetaData) result);
         }
         else if(enterpriseBeanMetaDataClass.equals(JBossMessageDrivenBeanMetaData.class))
         {
            result = new JBossMessageDrivenBeanGenericWrapper((JBossGenericBeanMetaData) result);
         }
View Full Code Here

    * </p>
    *
    */
   protected void initMetaDataBasedAnnotationRepository()
   {
      this.metadataBasedAnnotationRepo = new AnnotationRepositoryToMetaData(this.beanClass, this.xml, name, this.classloader);
      List<MetaDataBridge<InterceptorMetaData>> interceptorBridges = new ArrayList<MetaDataBridge<InterceptorMetaData>>();
      interceptorBridges.add(new InterceptorMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new InterceptorComponentMetaDataLoaderFactory(interceptorBridges));
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new AdditiveBeanInterceptorMetaDataBridge(this.beanClass, this.classloader, this.xml));
     
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.jndi.deployers.resolver.EJBBinderResolutionResult

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.