Methods Summary |
---|
public com.sun.enterprise.deployment.annotation.AnnotatedElementHandler | createContextForEjb()This methods create a context for Ejb(s) by using descriptor(s)
associated to given ejbClassName.
Return null if corresponding descriptor is not found.
Class ejbClass = (Class)this.getProcessingContext().getProcessor(
).getLastAnnotatedElement(ElementType.TYPE);
EjbDescriptor[] ejbDescs = null;
String ejbClassName = null;
if (ejbClass != null) {
ejbClassName = ejbClass.getName();
ejbDescs = this.getDescriptor().getEjbByClassName(ejbClassName);
}
AnnotatedElementHandler aeHandler = null;
if (ejbDescs != null && ejbDescs.length > 1) {
aeHandler = new EjbsContext(ejbDescs, ejbClass);
} else if (ejbDescs != null && ejbDescs.length == 1) {
aeHandler = new EjbContext(ejbDescs[0], ejbClass);
}
if (aeHandler != null) {
// push a EjbContext to stack
this.getProcessingContext().pushHandler(aeHandler);
}
return aeHandler;
|
public com.sun.enterprise.deployment.annotation.AnnotatedElementHandler | createContextForEjbInterceptor()This methods create a context for EjbInterceptor associated to
given className.
Return null if corresponding descriptor is not found.
Class interceptorClass =
(Class)this.getProcessingContext().getProcessor(
).getLastAnnotatedElement(ElementType.TYPE);
EjbInterceptor ejbInterceptor =
this.getDescriptor().getInterceptorByClassName(
interceptorClass.getName());
AnnotatedElementHandler aeHandler = null;
if (ejbInterceptor != null) {
aeHandler = new EjbInterceptorContext(ejbInterceptor);
// push a EjbInterceptorContext to stack
this.getProcessingContext().pushHandler(aeHandler);
}
return aeHandler;
|
public com.sun.enterprise.deployment.EjbBundleDescriptor | getDescriptor()
return (EjbBundleDescriptor)descriptor;
|
public com.sun.enterprise.deployment.types.HandlerChainContainer[] | getHandlerChainContainers(boolean serviceSideHandlerChain, java.lang.Class declaringClass)
if(serviceSideHandlerChain) {
EjbDescriptor[] ejbs;
if(declaringClass.isInterface()) {
ejbs = getDescriptor().getEjbBySEIName(declaringClass.getName());
} else {
ejbs = getDescriptor().getEjbByClassName(declaringClass.getName());
}
List<WebServiceEndpoint> result = new ArrayList<WebServiceEndpoint>();
for (EjbDescriptor ejb : ejbs) {
result.addAll(getDescriptor().getWebServices().getEndpointsImplementedBy(ejb));
}
return(result.toArray(new HandlerChainContainer[0]));
} else {
List<ServiceReferenceDescriptor> result = new ArrayList<ServiceReferenceDescriptor>();
result.addAll(getDescriptor().getServiceReferenceDescriptors());
return(result.toArray(new HandlerChainContainer[0]));
}
|
public com.sun.enterprise.deployment.types.ServiceReferenceContainer[] | getServiceRefContainers()
ServiceReferenceContainer[] container =
new ServiceReferenceContainer[getDescriptor().getEjbs().size()];
ServiceReferenceContainer[] ret =
(ServiceReferenceContainer[])getDescriptor().getEjbs().toArray(container);
return ret;
|