+1 May we add ThreadLocal variable to JavassistProxyFactory while creating instance and check this in InterceptorHandler?
WDYT? --Gurkan ________________________________ From: Eric Covener <[email protected]> To: [email protected] Sent: Fri, October 30, 2009 12:58:24 AM Subject: Re: svn commit: r831026 - in /incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test: component/intercept/webbeans/CallBusinessInConstructorBean.java unittests/intercept/webbeans/CallingBusinessInConstructorTest.java On Thu, Oct 29, 2009 at 12:56 PM, <[email protected]> wrote: > Author: gerdogdu > Date: Thu Oct 29 16:56:00 2009 > New Revision: 831026 > > URL: http://svn.apache.org/viewvc?rev=831026&view=rev > Log: > Testing calling business method from constructor. > + defineSimpleWebBeanInterceptor(SecureInterceptor.class); > + Bean<CallBusinessInConstructorBean> bean = > defineSimpleWebBean(CallBusinessInConstructorBean.class); > + CallBusinessInConstructorBean instance = > (CallBusinessInConstructorBean) > getInstanceByName("callBusinessInConstructorBean"); > + > + Assert.assertNotNull(instance); > + > + Assert.assertTrue(SecureInterceptor.CALL); While 7.2 of 299 does not cover this explicitly, Joe Bergmark made a good argument offline that the proxy calling the underlying bean constructor may not be correctly interpreted here as a business method invocation, since it's the container making the call and not via a contextual reference. -- Eric Covener [email protected]
