You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Eric Covener (JIRA)" <ji...@apache.org> on 2010/03/05 15:52:27 UTC
[jira] Created: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
-------------------------------------------------------------------------------------------------------------
Key: OWB-318
URL: https://issues.apache.org/jira/browse/OWB-318
Project: OpenWebBeans
Issue Type: Bug
Components: Interceptor and Decorators
Affects Versions: M4
Reporter: Eric Covener
Assignee: Eric Covener
One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by Gurkan Erdogdu <cg...@gmail.com>.
Eric you are right. According to the interceptor specification, if a same
interceptor is applied to different methods, owner class has just one
interceptor instance.
But I am afraid that, we create a new instance for each WebBeansInterceptor
bean in the InterceptorHandler#injectInterceptorFields for each business
method call. For EJBInterceptors, currently we create a new instance of
InterceptorData for the same interceptor applied to a different methods of
the same target class in the WebBeansUtil#configureInterceptorMethods method
via
> try
> {
> if (!isDefinedWithWebBeans)
> {
> *intData.setInterceptorInstance(newInstanceForced(clazz));*
> }
> }
>
>
This seems to be a wrong and not performancable! It needs update!
Moreover, currently we do not inject dependencies of the EJBInterceptors. We
also have to provide this functionality. I have added OWBInjector class for
injecting dependencies of Java EE components that are not beans.
Thanks;
--Gurkan
2010/3/5 Eric Covener (JIRA) <ji...@apache.org>
>
> [
> https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841901#action_12841901]
>
> Eric Covener commented on OWB-318:
> ----------------------------------
>
> I'm not sure if an InterceptorDataImpl should be shared or if we should
> have N Impl's and one underlying interceptor class instance. Gurkan, I see
> you were in this neighborhood recently, DYT?
>
> > multiple methods with same EJB @interceptors(foo.class) in same bean
> class get multiple interceptor instances
> >
> -------------------------------------------------------------------------------------------------------------
> >
> > Key: OWB-318
> > URL: https://issues.apache.org/jira/browse/OWB-318
> > Project: OpenWebBeans
> > Issue Type: Bug
> > Components: Interceptor and Decorators
> > Affects Versions: M4
> > Reporter: Eric Covener
> > Assignee: Eric Covener
> > Original Estimate: 6h
> > Remaining Estimate: 6h
> >
> > One managed bean with multiple methods with the same EJB
> @interceptors(foo.class) get multiple interceptor instances, but we should
> only create 1 instance.
> > See TCK method
> org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
--
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com
[jira] Commented: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908101#action_12908101 ]
Eric Covener commented on OWB-318:
----------------------------------
something wrong after applying the patch, mvn -Dtest=org.apache.webbeans.newtests.interceptors.business.tests.InterceptorPerformanceTest test
gets 25x slower, seems like it's creating too many instanes
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Fix For: 1.0.0-alpha-1
>
> Attachments: owb-318-patch.diff
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908118#action_12908118 ]
Eric Covener commented on OWB-318:
----------------------------------
whoops, I had DEBUG logging set at JRE level for the unit test
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Fix For: 1.0.0-alpha-1
>
> Attachments: owb-318-patch.diff
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Covener reopened OWB-318:
------------------------------
reopening per Rohit
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Fix For: 1.0.0-alpha-1
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Covener resolved OWB-318.
------------------------------
Resolution: Fixed
duplicate @Interceptors in a managed bean now share an instance of the interceptor class
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Fix For: 1.0.0
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Covener resolved OWB-318.
------------------------------
Fix Version/s: 1.0.0-alpha-3
(was: 1.0.0-alpha-1)
Resolution: Fixed
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Fix For: 1.0.0-alpha-3
>
> Attachments: owb-318-patch.diff
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Rohit Dilip Kelapure (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rohit Dilip Kelapure updated OWB-318:
-------------------------------------
Attachment: owb-318-patch.diff
Patch for OWB-318
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Fix For: 1.0.0-alpha-1
>
> Attachments: owb-318-patch.diff
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gurkan Erdogdu updated OWB-318:
-------------------------------
Fix Version/s: 1.0.0
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Fix For: 1.0.0
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OWB-318) multiple methods with same EJB
@interceptors(foo.class) in same bean class get multiple interceptor
instances
Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841901#action_12841901 ]
Eric Covener commented on OWB-318:
----------------------------------
I'm not sure if an InterceptorDataImpl should be shared or if we should have N Impl's and one underlying interceptor class instance. Gurkan, I see you were in this neighborhood recently, DYT?
> multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
> -------------------------------------------------------------------------------------------------------------
>
> Key: OWB-318
> URL: https://issues.apache.org/jira/browse/OWB-318
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Eric Covener
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> One managed bean with multiple methods with the same EJB @interceptors(foo.class) get multiple interceptor instances, but we should only create 1 instance.
> See TCK method org.jboss.jsr299.tck.interceptors.tests.method.MethodLevelInterceptorTest.testInterceptorCanBeAppliedToMoreThanOneMethod().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.