Bug 901324 (JBPAPP6-1792)

Summary: AroundInvokeAnnotationParsingProcessor should fail when more methods with @AroundInvoke annotation are found in the class
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Josef Cacek <jcacek>
Component: EJBAssignee: Stuart Douglas <sdouglas>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: high Docs Contact: Russell Dickenson <rdickens>
Priority: high    
Version: 6.0.1CC: ajustin, ehugonne, jcacek, kkhan, myarboro, pslavice, smumford
Target Milestone: ER2   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1792
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, classes were not checked for multiple @AroundInvoke methods. As a result, the first one discovered would be used, and any others would be ignored. In this release of the product, the deployment fails if there are multiple @AroundInvoke methods, alerting the developer to the problem.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:40:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josef Cacek 2013-01-16 14:53:01 UTC
project_key: JBPAPP6

AroundInvokeAnnotationParsingProcessor should fail when more methods with @AroundInvoke annotation is found in the class.
[The specification|http://docs.oracle.com/javaee/6/api/javax/interceptor/AroundInvoke.html] says:
{panel}
A class must not declare more than one AroundInvoke method.
{panel}

The JBoss AS allows more such methods and then it chooses one of them which is used as the interceptor.

It becomes even more important to check the interceptor validity now with the new feature introduced by AS7-5897 (server side non-EE interceptors for EE invocations).

Comment 1 Josef Cacek 2013-01-16 14:54:09 UTC
Link: Added: This issue is related to AS7-5897


Comment 2 Josef Cacek 2013-01-17 14:14:06 UTC
Test (ignored for now) added in https://github.com/jbossas/jboss-as/pull/3892 

{{org.jboss.as.test.integration.ejb.container.interceptor.ContainerInterceptorsTestCase}}
{code}
@Deployment(name = "incorrect-deployment")
@ShouldThrowException(Exception.class)
public static JavaArchive createIncorrectDeployment() {
{code}

Comment 5 Emmanuel Hugonnet (ehsavoie) 2014-03-31 13:37:41 UTC
Upstream PR : https://github.com/wildfly/wildfly/pull/6104
PR : https://github.com/jbossas/jboss-eap/pull/1164