You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Quintin Beukes <qu...@last.za.net> on 2009/10/20 12:38:43 UTC

Dev Concepts

Hey,

In Geronimo OpenEJB seems to give me Stateless proxies for Singleton
beans. This doesn't seem right.

How/where are the proxy objects created for stateless/singleton objects.

I have found that doing the remote lookup on a singleton, causes
Proxy.getInvocationHandler(proxy) to return a Stateless Proxy, but
can't seem to find where these proxies are registered so I can figure
out how the toy works?

Quintin Beukes

Re: Dev Concepts

Posted by Quintin Beukes <qu...@skywalk.co.za>.
I forgot I even sent this mail. Thanks, I found the problem.

Quintin Beukes



On Wed, Oct 21, 2009 at 1:07 AM, David Blevins <da...@visi.com> wrote:
>
> On Oct 20, 2009, at 3:38 AM, Quintin Beukes wrote:
>
>> In Geronimo OpenEJB seems to give me Stateless proxies for Singleton
>> beans. This doesn't seem right.
>>
>> How/where are the proxy objects created for stateless/singleton objects.
>>
>> I have found that doing the remote lookup on a singleton, causes
>> Proxy.getInvocationHandler(proxy) to return a Stateless Proxy, but
>> can't seem to find where these proxies are registered so I can figure
>> out how the toy works?
>
> See EjbHomeProxyHandler.createHomeProxy.  Everything proxy-wise is seeded
> through that method.  We bind all the homes in JNDI and on lookup, depending
> on the interface type, we return the home or ask the home to create an
> object and return the object.
>
> Or maybe it's easier to throw a break point in
> BusinessLocalReference.getObject and just follow the code downstream.
>  Looking for where it's constructed will bring you to the code on how it is
> built (JndiBuilder->CoreDeploymentInfo->EjbHomeProxyHandler.createHomeProxy)
>
>
> -David
>
>
>
>

Re: Dev Concepts

Posted by David Blevins <da...@visi.com>.
On Oct 20, 2009, at 3:38 AM, Quintin Beukes wrote:

> In Geronimo OpenEJB seems to give me Stateless proxies for Singleton
> beans. This doesn't seem right.
>
> How/where are the proxy objects created for stateless/singleton  
> objects.
>
> I have found that doing the remote lookup on a singleton, causes
> Proxy.getInvocationHandler(proxy) to return a Stateless Proxy, but
> can't seem to find where these proxies are registered so I can figure
> out how the toy works?

See EjbHomeProxyHandler.createHomeProxy.  Everything proxy-wise is  
seeded through that method.  We bind all the homes in JNDI and on  
lookup, depending on the interface type, we return the home or ask the  
home to create an object and return the object.

Or maybe it's easier to throw a break point in  
BusinessLocalReference.getObject and just follow the code downstream.   
Looking for where it's constructed will bring you to the code on how  
it is built (JndiBuilder->CoreDeploymentInfo- 
 >EjbHomeProxyHandler.createHomeProxy)


-David