Bug 901324 (JBPAPP6-1792) - AroundInvokeAnnotationParsingProcessor should fail when more methods with @AroundInvoke annotation are found in the class
Summary: AroundInvokeAnnotationParsingProcessor should fail when more methods with @Ar...
Status: CLOSED CURRENTRELEASE
Alias: JBPAPP6-1792
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER2
: EAP 6.3.0
Assignee: Stuart Douglas
QA Contact: Jan Martiska
Russell Dickenson
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-16 14:53 UTC by Josef Cacek
Modified: 2014-07-17 04:31 UTC (History)
7 users (show)

(edit)
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.
Clone Of:
(edit)
Last Closed: 2014-06-28 15:40:24 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPAPP6-1792 Major Closed AroundInvokeAnnotationParsingProcessor should fail when more methods with @AroundInvoke annotation are found in the clas... 2014-07-24 07:23:55 UTC
JBoss Issue Tracker WFLY-3192 Major Resolved AroundInvokeAnnotationParsingProcessor should fail when more methods with @AroundInvoke annotation are found in the clas... 2014-07-24 07:23:55 UTC

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


Note You need to log in before you can comment on or make changes to this bug.