Examples of beanInterface()


Examples of javax.annotation.Resource.beanInterface()

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

Examples of javax.annotation.Resource.beanInterface()

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

Examples of javax.annotation.Resource.beanInterface()

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

Examples of javax.annotation.Resource.beanInterface()

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

Examples of javax.ejb.EJB.beanInterface()

         throw new IllegalArgumentException("Injection point represents a method which doesn't follow JavaBean conventions (must have exactly one parameter) " + injectionPoint);
      }
      EJB annotation = injectionPoint.getAnnotated().getAnnotation(EJB.class);
      // Get properties from the annotation
      String beanName = annotation.beanName();
      String beanInterface = annotation.beanInterface().getName();

      // Supply beanInterface from reflection if not explicitly-defined
      if (beanInterface == null || beanInterface.equals(Object.class.getName()))
      {
         if (injectionPoint.getMember() instanceof Field && injectionPoint.getType() instanceof Class<?>)
View Full Code Here

Examples of javax.ejb.EJB.beanInterface()

      finder = new ClassFinder(getClassPath());
      fieldList = finder.findAnnotatedFields(EJB.class);
      for(Iterator fields = fieldList.iterator(); fields.hasNext();) {
        Field field = (Field) fields.next();
        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);
View Full Code Here

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

Examples of javax.ejb.EJB.beanInterface()

      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

Examples of javax.ejb.EJB.beanInterface()

        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

Examples of javax.ejb.EJB.beanInterface()

            ManagedReferenceFactory factory = (ManagedReferenceFactory) controller.getValue();
            return factory.getReference().getInstance();
        } else {
            final Set<ViewDescription> viewService;
            if (ejb.beanName().isEmpty()) {
                if (ejb.beanInterface() != Object.class) {
                    viewService = applicationDescription.getComponentsForViewName(ejb.beanInterface().getName());
                } else {
                    viewService = applicationDescription.getComponentsForViewName(getType(injectionPoint.getType()).getName());
                }
            } else {
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.