You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Jochen Zink <jo...@web.de> on 2007/12/07 16:06:30 UTC

Dynamic dependency for external EJBs

Hello,

It is a little bit difficult to describe, but I hope everyone can understand what I want :) :

I have an EAR file, containing a single EJB.jar
This EJB needs access to another EJB, which is not inside the same EAR.

In my opinion it is necessary, that a dependency and name mapping is declared inside the deployment plan of the EAR file, to get access to the external EJB.

But, we want a little bit more. The EAR file (let us call it ENGINE) works in production and need access to the external EJB (deployed in the same geronimo 2.0.x server). After a while, the exactly the same ENGINE EAR needs access to another external EJB. The other external EJB can be used in the same way as the first external EJB (both has implemented the same Interface), only the JNDI name is different. Is it possible to get access to the second external EJB, without reinstalling the EAR file?

I read something about EJBs inside geronimo but it seems, that this can't be work. If it is not possible, is there another alternative to get the same behavior?

Thanks a lot!
Regards
Jochen

_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066


Re: Dynamic dependency for external EJBs

Posted by David Blevins <da...@visi.com>.
On Dec 7, 2007, at 7:06 AM, Jochen Zink wrote:

> Hello,
>
> It is a little bit difficult to describe, but I hope everyone can  
> understand what I want :) :
>
> I have an EAR file, containing a single EJB.jar
> This EJB needs access to another EJB, which is not inside the same  
> EAR.
>
> In my opinion it is necessary, that a dependency and name mapping is  
> declared inside the deployment plan of the EAR file, to get access  
> to the external EJB.
>
> But, we want a little bit more. The EAR file (let us call it ENGINE)  
> works in production and need access to the external EJB (deployed in  
> the same geronimo 2.0.x server). After a while, the exactly the same  
> ENGINE EAR needs access to another external EJB. The other external  
> EJB can be used in the same way as the first external EJB (both has  
> implemented the same Interface), only the JNDI name is different. Is  
> it possible to get access to the second external EJB, without  
> reinstalling the EAR file?
>
> I read something about EJBs inside geronimo but it seems, that this  
> can't be work. If it is not possible, is there another alternative  
> to get the same behavior?

The Geronimo deployment model is such that nothing can be changed  
after deployment.  About the closest I can think is that it's possible  
to lookup any EJB deployed via the  
org.apache.openejb.client.LocalInitialContextFactory and a new  
InitialContext.  You might be able to rig up something clever using  
that.

-David