[jira] Commented: (OWB-318) multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
[ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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.
Re: [jira] Commented: (OWB-318) multiple methods with same EJB @interceptors(foo.class) in same bean class get multiple interceptor instances
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) j...@apache.org [ https://issues.apache.org/jira/browse/OWB-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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