I think that in your case : RequestScope is ended and @RequestScoped bean is 
destroyed by the container. When this bean instance is destroyed by the 
container, container collects all of its dependencies from 
CreationalContextImpl 
and destroy all of them. In your case, it seems that this is the Stateful EJB 
instance dependency. To destroy stateful instance, container calls remove 
method.

Seems everthing is usual!

--Gurkan


________________________________
From: Eric Covener <[email protected]>
To: [email protected]
Sent: Sat, July 17, 2010 4:06:53 PM
Subject: EJB contextual reference (our proxy) in creationalContext instead of  
instance?

I was surprised in the backtrace below that we ended up going through
our own javassist proxy when destroying the EJB instance in our
creational context.   Are we ending up storing the wrong thing in the
context along the way or am I misunderstanding?

(The method being invoked is an @Remove method)

>         at 
>org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:281)
>
>         at $Proxy105.remove(Unknown Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
>         at 
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>
>         at java.lang.reflect.Method.invoke(Method.java:600)
>         at 
>org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler.invoke(EjbBeanProxyHandler.java:156)
>

>         at 
>org.apache.webbeans.sample.ejb.Echo_$$_javassist_3.remove(Echo_$$_javassist_3.java)
>

>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
>         at 
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>
>         at java.lang.reflect.Method.invoke(Method.java:600)
>         at 
>org.apache.webbeans.util.ClassUtil.callInstanceMethod(ClassUtil.java:533)
>         at 
>org.apache.webbeans.ejb.common.component.BaseEjbBean.destroyComponentInstance(BaseEjbBean.java:149)
>
>         at 
>org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:179)
>
>         at 
>org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:265)
>
>         at 
>org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:135)
>
>         at 
>org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:104)
>
>         at 
>org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:219)
>         at 
>org.apache.webbeans.context.creational.CreationalContextImpl.removeDependents(CreationalContextImpl.java:278)
>
>         at 
>org.apache.webbeans.context.creational.CreationalContextImpl.release(CreationalContextImpl.java:349)
>
>         at 
>org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:232)
>         at 
>org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:268)
>
>         at 
>org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:290)
>         at 
>org.apache.webbeans.web.context.WebContextsService.destroyRequestContext(WebContextsService.java:333)
>
>         at 
>org.apache.webbeans.web.context.WebContextsService.endContext(WebContextsService.java:169)
>



-- 
Eric Covener
[email protected]


Reply via email to