tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Chaining InitialContexts ???
Date Fri, 04 Sep 2009 20:34:37 GMT

On Sep 1, 2009, at 6:07 AM, uglything wrote:

> Hello everyone.
> After having worked on something else (conception mainly with loads  
> of UML2)
> I'm coming back to the Plain Old Java Coding...
> I'm willing to give a try to the @Remote concepts which I don't know  
> at all.
> Basically, I have an OpenEJB + Tomcat combo hosting my server  
> application
> which itself contains many @Remote classes. On the other hand I want  
> the
> same combo hosting my client application which rely on the remoted  
> classes
> from the server.
> I would like to know if ther is some kind of configuration to "let the
> server InitialContext merge into the client InitialContext" might  
> sound
> ridiculous and/or naïve... Just let me know... but as far as I've  
> searched I
> don't find anything of interrest...
> What I've done so far - 80% of code monkey copy/paste your examples  
> - is
> starting a OpenEJB + Tomcat server and starting a JUnit test case  
> with a
> RemoteInitialContextFactory linked to the server through httpejbd (I  
> guess)
> whithout problem. I can easily hit the remoted beans that works great.
> But this initial context does not discover my client ejbs as the
> LocalInitialContextFactory does.

If by client ejbs you mean the @LocalClient injection support, then  
right, the RemoteInitialContextFactory doesn't yet support that.  We  
do plan to add support for an @RemoteClient which will work with the  
RemoteInitialContextFactory in a similar way.  There's a jira you can  
watch if you want to keep updated on progress there: 
   (for notifications)

> On the other hand, I didn't find anything to tell a
> LocalInitialContextFactory to search also into a remote directory...
> So far my only guess is to manually create a Locator-like object  
> wrapping a
> RemoteICF and make manual lookups into it. Maybe it's just the way  
> to go...

Right, at the moment a service locator is the best approach.

We have some code in the openejb-client jar you can use or copy:

> Another question arises from that...
> Is there any support to propagate a transaction started from the  
> client to
> the server ? It seems that this is an optional requierement of the  
> EJB3
> specs...

There hasn't been any demand for it, but if you need it we can put it  
on the list.

> BTW : Is there any registering to do to post answers to other people's
> questions ? I would like to pay back a little for your great support  
> by
> helping some people here (up to my little knowledge though)

That's fantastic.  We can always use more help on the user list and  
elsewhere.  We're a small team and every bit helps.  Feel free to jump  
in anytime.  You can post through nabble or by sending mail directly  
to the list.


View raw message