users@jersey.java.net

Re: [Jersey] which ManagedBean can inject EJB ?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 21 Oct 2009 18:38:49 +0200

On Oct 21, 2009, at 6:31 PM, Felipe Gaścho wrote:

> [#|2009-10-21T18:30:42.957+0200|INFO|glassfish|
> com
> .sun
> .jersey.samples.managedbeans.resources.ManagedBeanSingletonResource|
> _ThreadID=67;_ThreadName=Thread-3;|In
> constructor
> com
> .sun
> .jersey
> .samples.managedbeans.resources.ManagedBeanSingletonResource_at_8a56ed|#]
>
> [#|2009-10-21T18:30:42.958+0200|INFO|glassfish|
> com
> .sun
> .jersey.samples.managedbeans.resources.ManagedBeanSingletonResource|
> _ThreadID=67;_ThreadName=Thread-3;|In
> constructor
> com
> .sun
> .jersey
> .samples
> .managedbeans
> .resources
> .__EJB31_Generated__ManagedBeanSingletonResource__Intf____Bean__
> @734372|#]
>
> I am too lost here.. ok, I love glassfish.. I will pass through it :)

That is a consequence of client proxies (you will get the same with
299). The proxy pattern used is extension with delegation, and thus
two instances will be created, one for the proxy that is injected and
one for which the proxy delegates to.

Paul.