Package javax.ejb

Examples of javax.ejb.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


/*    */     }
/* 62 */     RemoveMethodMetaData metaData = new RemoveMethodMetaData();
/* 63 */     NamedMethodMetaData beanMethod = new NamedMethodMetaData();
/* 64 */     beanMethod.setMethodName(method.getName());
/* 65 */     metaData.setBeanMethod(beanMethod);
/* 66 */     metaData.setRetainIfException(remove.retainIfException());
/*    */
/* 68 */     MethodParametersMetaData methodParams = ProcessorUtils.getMethodParameters(method);
/* 69 */     beanMethod.setMethodParams(methodParams);
/*    */
/* 71 */     return metaData;
View Full Code Here

/* 66 */     if (rm == null)
/*    */     {
/* 68 */       log.warn("Cannot find @" + Remove.class.getName() + " for " + method + " assuming defaults");
/* 69 */       rm = new RemoveImpl();
/*    */     }
/* 71 */     return new StatefulRemoveInterceptor(rm.retainIfException());
/*    */   }
/*    */
/*    */   public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
/*    */   {
/* 76 */     throw new IllegalStateException("PER_CLASS_JOINPOINT NOT APPLICABLE");
View Full Code Here

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

                    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

            if (removalInfo == null) {
                // if this element is not defined in xml
                // use all information from annotation
                removalInfo = new EjbRemovalInfo();
                removalInfo.setRemoveMethod(removeMethod);
                removalInfo.setRetainIfException(remove.retainIfException());
                sessionDescriptor.addRemoveMethod(removalInfo);
            } else {
                // if this element is already defined in xml
                // set the retainIfException only if this subelement
                // is not defined in xml
View Full Code Here

                // if this element is already defined in xml
                // set the retainIfException only if this subelement
                // is not defined in xml
                if (! removalInfo.isRetainIfExceptionSet()) {
                    removalInfo.setRetainIfException(
                        remove.retainIfException());
                }
            }
        }
       
        return getDefaultProcessedResult();
View Full Code Here

    super.introspect(apiMethod, implMethod);

    Remove remove = implMethod.getAnnotation(Remove.class);
    if (remove != null) {
      _isRemoveRetainIfException = remove.retainIfException();
    }
  }

  protected TransactionAttributeType getDefaultTransactionType()
  {
View Full Code Here

    super.introspect(apiMethod, implMethod);

    Remove remove = implMethod.getAnnotation(Remove.class);
    if (remove != null) {
      _isRemoveRetainIfException = remove.retainIfException();
    }
  }

  protected TransactionAttributeType getDefaultTransactionType()
  {
View Full Code Here

                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);
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.