/** * Receive notication of a fine error message * @param ape The warning information * @throws any exception to stop the annotation processing */ public void fine(AnnotationProcessorException ape) throws AnnotationProcessorException { if (logger.isLoggable(Level.FINE)){ AnnotationInfo info = ape.getLocator(); if (info==null){ logger.fine(ape.getMessage()); } else{ logger.fine(AnnotationUtils.getLocalString( "enterprise.deployment.annotation.error", "{2}\n symbol: {0}\n location: {1}\n\n", new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()})); } } }
declaringClass = (Class)annElem; } else { if (annInfo.getElementType().equals(ElementType.FIELD)) { } else if (annInfo.getElementType().equals(ElementType.METHOD)) { } else if (annInfo.getElementType().equals(ElementType.TYPE)) { declaringClass = (Class) annElem; } else {
/** * Receive notication of a fine error message * @param ape The warning information * @throws any exception to stop the annotation processing */ public void fine(AnnotationProcessorException ape) throws AnnotationProcessorException { if (logger.isLoggable(Level.FINE)){ AnnotationInfo info = ape.getLocator(); if (info==null){ logger.fine(ape.getMessage()); } else{ logger.fine(AnnotationUtils.getLocalString( "enterprise.deployment.annotation.error", "{2}\n symbol: {0}\n location: {1}\n\n", new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()})); } } }
/** * Receive notification of a warning * @param ape The warning information * @throws any exception to stop the annotation processing */ public void warning(AnnotationProcessorException ape) throws AnnotationProcessorException { if (logger.isLoggable(Level.WARNING)){ AnnotationInfo info = ape.getLocator(); if (info==null){ logger.warning(ape.getMessage()); } else{ logger.warning(AnnotationUtils.getLocalString( "enterprise.deployment.annotation.error", "{2}\n symbol: {0}\n location: {1}\n\n", new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()})); } } }
declaringClass = (Class)annElem; } else { if (annInfo.getElementType().equals(ElementType.FIELD)) { } else if (annInfo.getElementType().equals(ElementType.METHOD)) { } else if (annInfo.getElementType().equals(ElementType.TYPE)) { declaringClass = (Class) annElem; } else {
/** * Receive notification of a warning * @param ape The warning information * @throws any exception to stop the annotation processing */ public void warning(AnnotationProcessorException ape) throws AnnotationProcessorException { if (logger.isLoggable(Level.WARNING)){ AnnotationInfo info = ape.getLocator(); if (info==null){ logger.warning(ape.getMessage()); } else{ logger.warning(AnnotationUtils.getLocalString( "enterprise.deployment.annotation.error", "{2}\n symbol: {0}\n location: {1}\n\n", new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()})); } } }
/** * Receive notification of an error * @param ape The error information * @throws amy exception to stop the annotation processing */ public void error(AnnotationProcessorException ape) throws AnnotationProcessorException { AnnotationInfo info = ape.getLocator(); if (info==null){ logger.severe(ape.getMessage()); } else{ logger.severe(AnnotationUtils.getLocalString( "enterprise.deployment.annotation.error", "{2}\n symbol: {0} location: {1}\n\n", new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()})); } } }
/** * Receive notification of an error * @param ape The error information * @throws amy exception to stop the annotation processing */ public void error(AnnotationProcessorException ape) throws AnnotationProcessorException { AnnotationInfo info = ape.getLocator(); if (info==null){ logger.severe(ape.getMessage()); } else{ logger.severe(AnnotationUtils.getLocalString( "enterprise.deployment.annotation.error", "{2}\n symbol: {0} location: {1}\n\n", new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()})); } } }
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { for (EjbContext ejbContext : ejbContexts) { EjbDescriptor ejbDesc = (EjbDescriptor) ejbContext.getDescriptor(); if (ElementType.TYPE.equals(ainfo.getElementType())) { ejbContext.addPostProcessInfo(ainfo, this); } else { Method annMethod = (Method) ainfo.getAnnotatedElement(); setAsynchronous(annMethod, ejbDesc); } } return getDefaultProcessedResult(); }
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { for (EjbContext ejbContext : ejbContexts) { EjbDescriptor ejbDesc = ejbContext.getDescriptor(); if (ElementType.TYPE.equals(ainfo.getElementType())) { ejbContext.addPostProcessInfo(ainfo, this); } else { Method annMethod = (Method) ainfo.getAnnotatedElement(); setAsynchronous(annMethod, ejbDesc); } } return getDefaultProcessedResult(); }
if(ElementType.METHOD.equals(ainfo.getElementType())) { Method m = (Method) ainfo.getAnnotatedElement(); md = new MethodDescriptor(m, MethodDescriptor.EJB_BEAN); } else if(ElementType.CONSTRUCTOR.equals(ainfo.getElementType())) { Constructor c = (Constructor) ainfo.getAnnotatedElement(); Class cl = c.getDeclaringClass();
if(ElementType.METHOD.equals(ainfo.getElementType())) { Method m = (Method) ainfo.getAnnotatedElement(); MethodDescriptor md = new MethodDescriptor(m, MethodDescriptor.EJB_BEAN); binding.setBusinessMethod(md); } else if(ElementType.CONSTRUCTOR.equals(ainfo.getElementType())) { Constructor c = (Constructor) ainfo.getAnnotatedElement(); Class cl = c.getDeclaringClass();
EjbDescriptor ejbDesc = (EjbDescriptor) ejbContext.getDescriptor(); if (ElementType.METHOD.equals(ainfo.getElementType())) { Method annMethod = (Method) ainfo.getAnnotatedElement();
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { EjbBundleDescriptor ejbBundle = ((EjbDescriptor)ejbContexts[0].getDescriptor()). getEjbBundleDescriptor(); for(EjbContext next : ejbContexts) { EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor(); // Create binding information. InterceptorBindingDescriptor binding = new InterceptorBindingDescriptor(); binding.setEjbName(ejbDescriptor.getName()); binding.setExcludeDefaultInterceptors(true); if(ElementType.METHOD.equals(ainfo.getElementType())) { Method m = (Method) ainfo.getAnnotatedElement(); MethodDescriptor md = new MethodDescriptor(m, MethodDescriptor.EJB_BEAN); binding.setBusinessMethod(md); } ejbBundle.prependInterceptorBinding(binding); } return getDefaultProcessedResult(); }
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()); } } } } return getDefaultProcessedResult(); }
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { TransactionAttribute taAn = (TransactionAttribute) ainfo.getAnnotation(); for (EjbContext ejbContext : ejbContexts) { EjbDescriptor ejbDesc = ejbContext.getDescriptor(); ContainerTransaction containerTransaction = getContainerTransaction(taAn.value()); if (ElementType.TYPE.equals(ainfo.getElementType())) { ejbContext.addPostProcessInfo(ainfo, this); } else { Method annMethod = (Method) ainfo.getAnnotatedElement(); Set txBusMethods = ejbDesc.getTxBusinessMethodDescriptors(); for (Object next : txBusMethods) { MethodDescriptor nextDesc = (MethodDescriptor) next; Method m = nextDesc.getMethod(ejbDesc); if( TypeUtil.sameMethodSignature(m, annMethod) && ejbDesc.getContainerTransactionFor(nextDesc) == null ) { // override by xml ejbDesc.setContainerTransactionFor (nextDesc, containerTransaction); } } } } return getDefaultProcessedResult(); }
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()); } } } } return getDefaultProcessedResult(); }
EjbDescriptor ejbDesc = ejbContext.getDescriptor(); if (ElementType.TYPE.equals(ainfo.getElementType())) {
if (ElementType.TYPE.equals(ainfo.getElementType())) {
if (ElementType.TYPE.equals(ainfo.getElementType())) {