Package javax.ejb

Examples of javax.ejb.Remove


        // Now, analyze each interceptors found on methods.
        for (EasyBeansEjbJarMethodMetadata methodAnnotationMetaData
                : classAnnotationMetadata.getMethodMetadataCollection()) {

            // Set global interceptors for a given method (ie : Remove)
            Remove remove = methodAnnotationMetaData.getJRemove();
            if (remove != null) {
                List<JClassInterceptor> easyBeansMethodGlobalInterceptors = new ArrayList<JClassInterceptor>();
                String classType = null;
                // choose right interceptor class
                if (remove.retainIfException()) {
                    classType = Type.getInternalName(RemoveOnlyWithoutExceptionInterceptor.class);
                } else {
                    classType = Type.getInternalName(RemoveAlwaysInterceptor.class);
                }
                easyBeansMethodGlobalInterceptors.add(new JClassInterceptor(classType, EASYBEANS_INTERCEPTOR));
View Full Code Here


    out.println("isValidFinally = isValid;");
    out.popDepth();
    out.println("} finally {");
    out.pushDepth();
   
    Remove remove = getMethod().getAnnotation(Remove.class);

    if (remove != null) {
      boolean isRetainIfException= remove.retainIfException();
   
      if (isRetainIfException) {
        out.println("if (isValid)");
        out.println("  __caucho_destroy(null);");
      }
View Full Code Here

                Map<NamedMethod,RemoveMethod> declaredRemoveMethods = new HashMap<NamedMethod,RemoveMethod>();
                for (RemoveMethod removeMethod : session.getRemoveMethod()) {
                    declaredRemoveMethods.put(removeMethod.getBeanMethod(), removeMethod);
                }
                for (Method method : removeMethods) {
                    Remove remove = method.getAnnotation(Remove.class);
                    RemoveMethod removeMethod = new RemoveMethod(method, remove.retainIfException());

                    RemoveMethod declaredRemoveMethod = declaredRemoveMethods.get(removeMethod.getBeanMethod());

                    if (declaredRemoveMethod == null) {
                        session.getRemoveMethod().add(removeMethod);
                    } else if (!declaredRemoveMethod.isExplicitlySet()){
                        declaredRemoveMethod.setRetainIfException(remove.retainIfException());
                    }
                }
            }
        }
View Full Code Here

        // Get all the public methods of the bean class and super class
        Method[] methods = beanClass.getMethods();

        // Search for methods annotated with @Remove
        for (Method method : methods) {
            Remove annotation = method.getAnnotation(Remove.class);
            if (annotation != null) {
                // Get the corresponding method into the bean interface
                Method interfaceMethod;
                try {
                    interfaceMethod = beanInterface.getMethod(method.getName(), method
View Full Code Here

                Map<NamedMethod, RemoveMethod> declaredRemoveMethods = new HashMap<NamedMethod, RemoveMethod>();
                for (RemoveMethod removeMethod : session.getRemoveMethod()) {
                    declaredRemoveMethods.put(removeMethod.getBeanMethod(), removeMethod);
                }
                for (Annotated<Method> method : removeMethods) {
                    Remove remove = method.getAnnotation(Remove.class);
                    RemoveMethod removeMethod = new RemoveMethod(method.get(), remove.retainIfException());

                    RemoveMethod declaredRemoveMethod = declaredRemoveMethods.get(removeMethod.getBeanMethod());

                    if (declaredRemoveMethod == null) {
                        session.getRemoveMethod().add(removeMethod);
                    } else if (!declaredRemoveMethod.isExplicitlySet()) {
                        declaredRemoveMethod.setRetainIfException(remove.retainIfException());
                    }
                }
            }
        }
View Full Code Here

      super(finder);
   }
  
   public RemoveMethodMetaData create(Method method)
   {
      Remove remove = finder.getAnnotation(method, Remove.class);
      if(remove == null)
         return null;
     
      RemoveMethodMetaData metaData = new RemoveMethodMetaData();
      NamedMethodMetaData beanMethod = new NamedMethodMetaData();
      beanMethod.setMethodName(method.getName());
      metaData.setBeanMethod(beanMethod);
      metaData.setRetainIfException(remove.retainIfException());

      MethodParametersMetaData methodParams = ProcessorUtils.getMethodParameters(method);
      beanMethod.setMethodParams(methodParams);
     
      return metaData;
View Full Code Here

      super(finder);
   }
  
   public RemoveMethodMetaData create(Method method)
   {
      Remove remove = finder.getAnnotation(method, Remove.class);
      if(remove == null)
         return null;
     
      RemoveMethodMetaData metaData = new RemoveMethodMetaData();
      NamedMethodMetaData beanMethod = new NamedMethodMetaData();
      beanMethod.setMethodName(method.getName());
      metaData.setBeanMethod(beanMethod);
      metaData.setRetainIfException(remove.retainIfException());

      MethodParametersMetaData methodParams = ProcessorUtils.getMethodParameters(method);
      beanMethod.setMethodParams(methodParams);
     
      return metaData;
View Full Code Here

      super(finder);
   }
  
   public RemoveMethodMetaData create(Method method)
   {
      Remove remove = finder.getAnnotation(method, Remove.class);
      if(remove == null)
         return null;
     
      RemoveMethodMetaData metaData = new RemoveMethodMetaData();
      NamedMethodMetaData beanMethod = new NamedMethodMetaData();
      beanMethod.setMethodName(method.getName());
      metaData.setBeanMethod(beanMethod);
      metaData.setRetainIfException(remove.retainIfException());

      MethodParametersMetaData methodParams = ProcessorUtils.getMethodParameters(method);
      beanMethod.setMethodParams(methodParams);
     
      return metaData;
View Full Code Here

                Map<NamedMethod, RemoveMethod> declaredRemoveMethods = new HashMap<NamedMethod, RemoveMethod>();
                for (RemoveMethod removeMethod : session.getRemoveMethod()) {
                    declaredRemoveMethods.put(removeMethod.getBeanMethod(), removeMethod);
                }
                for (Method method : removeMethods) {
                    Remove remove = method.getAnnotation(Remove.class);
                    RemoveMethod removeMethod = new RemoveMethod(method, remove.retainIfException());

                    RemoveMethod declaredRemoveMethod = declaredRemoveMethods.get(removeMethod.getBeanMethod());

                    if (declaredRemoveMethod == null) {
                        session.getRemoveMethod().add(removeMethod);
                    } else if (!declaredRemoveMethod.isExplicitlySet()) {
                        declaredRemoveMethod.setRetainIfException(remove.retainIfException());
                    }
                }
            }
        }
View Full Code Here

                Map<NamedMethod,RemoveMethod> declaredRemoveMethods = new HashMap<NamedMethod,RemoveMethod>();
                for (RemoveMethod removeMethod : session.getRemoveMethod()) {
                    declaredRemoveMethods.put(removeMethod.getBeanMethod(), removeMethod);
                }
                for (Method method : removeMethods) {
                    Remove remove = method.getAnnotation(Remove.class);
                    RemoveMethod removeMethod = new RemoveMethod(method, remove.retainIfException());

                    RemoveMethod declaredRemoveMethod = declaredRemoveMethods.get(removeMethod.getBeanMethod());

                    if (declaredRemoveMethod == null) {
                        session.getRemoveMethod().add(removeMethod);
                    } else if (!declaredRemoveMethod.isExplicitlySet()){
                        declaredRemoveMethod.setRetainIfException(remove.retainIfException());
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of javax.ejb.Remove

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.