Package javax.ejb

Examples of javax.ejb.EJB.beanInterface()


        EJB ejbAnnotation = field.getAnnotation(EJB.class);
        if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
          try {
            home = initialContext.lookup(ejbAnnotation.name());
            // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
            home = cast(home, ejbAnnotation.beanInterface());
            field.setAccessible(true);
            field.set(this, home);
          } catch(Exception ex) {
            // TODO - MNour : Needs better exception handling
            ex.printStackTrace();
View Full Code Here


      finder = new ClassFinder(getClassPath());
      methodList = finder.findAnnotatedMethods(EJB.class);
      for(Iterator methods = methodList.iterator(); methods.hasNext();) {
        Method method = (Method) methods.next();
        EJB ejbAnnotation = method.getAnnotation(EJB.class);
        if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
          try {
            home = initialContext.lookup(ejbAnnotation.name());
            // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
            home = cast(home, ejbAnnotation.beanInterface());
            method.setAccessible(true);
View Full Code Here

        EJB ejbAnnotation = method.getAnnotation(EJB.class);
        if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
          try {
            home = initialContext.lookup(ejbAnnotation.name());
            // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
            home = cast(home, ejbAnnotation.beanInterface());
            method.setAccessible(true);
            method.invoke(this, new Object[] {home});
          } catch(Exception ex) {
            // TODO - MNour : Needs better exception handling
            ex.printStackTrace();
View Full Code Here

        else if(resourceReference.supports(EJB.class))
        {
            EJB annotation = resourceReference.getAnnotation(EJB.class);
                       
            String intf = null;
            if(annotation.beanInterface() != null
                    && annotation.beanInterface() != Object.class)
            {
                intf = annotation.beanInterface().getName();
            }
           
View Full Code Here

        {
            EJB annotation = resourceReference.getAnnotation(EJB.class);
                       
            String intf = null;
            if(annotation.beanInterface() != null
                    && annotation.beanInterface() != Object.class)
            {
                intf = annotation.beanInterface().getName();
            }
           
            if(intf == null)
View Full Code Here

                       
            String intf = null;
            if(annotation.beanInterface() != null
                    && annotation.beanInterface() != Object.class)
            {
                intf = annotation.beanInterface().getName();
            }
           
            if(intf == null)
            {
                intf = resourceReference.getResourceType().getName();
View Full Code Here

            throw new RuntimeException("@EJB can only be used with a set method: " + method);
         String encName = getEncName(ref, method);
         if (!container.getEncInjectors().containsKey(encName))
         {
            Class<?> businessInterface = method.getParameterTypes()[0];
            if (ref.beanInterface() != null && ref.beanInterface() != Object.class)
            {
               businessInterface = ref.beanInterface();
            }
            ejbRefEncInjector(ref.mappedName(), encName, method.getName().substring(0), businessInterface, ref.beanName(), "@EJB", container);
           
View Full Code Here

            throw new RuntimeException("@EJB can only be used with a set method: " + method);
         String encName = getEncName(ref, method);
         if (!container.getEncInjectors().containsKey(encName))
         {
            Class<?> businessInterface = method.getParameterTypes()[0];
            if (ref.beanInterface() != null && ref.beanInterface() != Object.class)
            {
               businessInterface = ref.beanInterface();
            }
            ejbRefEncInjector(ref.mappedName(), encName, method.getName().substring(0), businessInterface, ref.beanName(), "@EJB", container);
           
View Full Code Here

         if (!container.getEncInjectors().containsKey(encName))
         {
            Class<?> businessInterface = method.getParameterTypes()[0];
            if (ref.beanInterface() != null && ref.beanInterface() != Object.class)
            {
               businessInterface = ref.beanInterface();
            }
            ejbRefEncInjector(ref.mappedName(), encName, method.getName().substring(0), businessInterface, ref.beanName(), "@EJB", container);
           
            if (container.getAnnotation(IgnoreDependency.class, method) == null)
            {
View Full Code Here

      {
         String encName = getEncName(ref, field);
         if (!container.getEncInjectors().containsKey(encName))
         {
            Class<?> businessInterface = field.getType();
            if (ref.beanInterface() != null && ref.beanInterface() != Object.class)
            {
               businessInterface = ref.beanInterface();
            }
            if (container.getAnnotation(IgnoreDependency.class, field) == null)
            {
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.