use of com.sun.enterprise.deployment.EjbInterceptor in project Payara by payara.
the class InterceptorBindingNode method writeTotalOrdering.
private void writeTotalOrdering(Node parent, List<EjbInterceptor> interceptors, EjbDescriptor ejbDesc, MethodDescriptor method) {
Node bindingNode = appendChild(parent, EjbTagNames.INTERCEPTOR_BINDING);
appendTextChild(bindingNode, EjbTagNames.EJB_NAME, ejbDesc.getName());
Node totalOrderingNode = appendChild(bindingNode, EjbTagNames.INTERCEPTOR_ORDER);
for (EjbInterceptor next : interceptors) {
appendTextChild(totalOrderingNode, EjbTagNames.INTERCEPTOR_CLASS, next.getInterceptorClassName());
}
if (method != null) {
MethodNode methodNode = new MethodNode();
// Write out method description. void methods will be written
// out using an empty method-params element so they will not
// be interpreted as overloaded when processed.
methodNode.writeJavaMethodDescriptor(bindingNode, EjbTagNames.INTERCEPTOR_BUSINESS_METHOD, method, true);
}
}
use of com.sun.enterprise.deployment.EjbInterceptor in project Payara by payara.
the class AroundConstructHandler method processAnnotation.
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbInterceptorContext ejbInterceptorContext) throws AnnotationProcessorException {
EjbInterceptor ejbInterceptor = ejbInterceptorContext.getDescriptor();
ejbInterceptor.addAroundConstructDescriptor(getAroundConstructDescriptor(ainfo));
return getDefaultProcessedResult();
}
use of com.sun.enterprise.deployment.EjbInterceptor in project Payara by payara.
the class AroundInvokeHandler method processAnnotation.
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbInterceptorContext ejbInterceptorContext) throws AnnotationProcessorException {
EjbInterceptor ejbInterceptor = ejbInterceptorContext.getDescriptor();
ejbInterceptor.addAroundInvokeDescriptor(getAroundInvocationDescriptor(ainfo));
return getDefaultProcessedResult();
}
use of com.sun.enterprise.deployment.EjbInterceptor in project Payara by payara.
the class PostActivateHandler method processAnnotation.
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbInterceptorContext ejbInterceptorContext) throws AnnotationProcessorException {
EjbInterceptor ejbInterceptor = ejbInterceptorContext.getDescriptor();
ejbInterceptor.addPostActivateDescriptor(getPostActivateDescriptor(ainfo));
return getDefaultProcessedResult();
}
use of com.sun.enterprise.deployment.EjbInterceptor in project Payara by payara.
the class EjbDescriptor method getAroundInvokeInterceptors.
/**
* Return the ordered list of interceptor info for AroundInvoke behavior
* of a particular business method. This list *does* include the info
* on any bean class interceptor. If present, this would always be the
* last element in the list because of the precedence defined by the spec.
* @param businessMethod
* @return
*/
public List<EjbInterceptor> getAroundInvokeInterceptors(MethodDescriptor businessMethod) {
LinkedList<EjbInterceptor> aroundInvokeInterceptors = new LinkedList<EjbInterceptor>();
List<EjbInterceptor> classOrMethodInterceptors = getClassOrMethodInterceptors(businessMethod);
for (EjbInterceptor next : classOrMethodInterceptors) {
if (next.getAroundInvokeDescriptors().size() > 0) {
aroundInvokeInterceptors.add(next);
}
}
if (hasAroundInvokeMethod()) {
EjbInterceptor interceptorInfo = new EjbInterceptor();
interceptorInfo.setFromBeanClass(true);
interceptorInfo.addAroundInvokeDescriptors(getAroundInvokeDescriptors());
interceptorInfo.setInterceptorClassName(getEjbImplClassName());
aroundInvokeInterceptors.add(interceptorInfo);
}
return aroundInvokeInterceptors;
}
Aggregations