}
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
EjbContext[] ejbContexts) throws AnnotationProcessorException {
AccessTimeout timeout = (AccessTimeout) ainfo.getAnnotation();
for (EjbContext ejbContext : ejbContexts) {
if (ejbContext.getDescriptor() instanceof EjbSessionDescriptor) {
EjbSessionDescriptor sessionDesc =
(EjbSessionDescriptor) ejbContext.getDescriptor();
if( sessionDesc.isStateless() ) {
continue;
}
if (ElementType.TYPE.equals(ainfo.getElementType())) {
// Delay processing Class-level default until after methods are processed
ejbContext.addPostProcessInfo(ainfo, this);
} else {
Method annMethod = (Method) ainfo.getAnnotatedElement();
// Only assign access timeout info if the method hasn't already
// been processed. This correctly ignores superclass methods that
// are overridden and applies the correct .xml overriding semantics.
if(!matchesExistingAccessTimeoutMethod(annMethod, sessionDesc)) {
MethodDescriptor newMethodDesc = new MethodDescriptor(annMethod);
sessionDesc.addAccessTimeoutMethod(newMethodDesc, timeout.value(),
timeout.unit());
}
}
}
}