geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Zink <jochenl...@web.de>
Subject Re: Dynamic dependency for external EJBs
Date Mon, 10 Dec 2007 10:21:06 GMT
Thanks for your answer.

We have a little "workaround" to get a similar behavior. If it is not necessary to have EJB-Features,
then we can get this behavior with the following construction:

1. Deploy a configuration with a global Interface (named: GlobalInterface)
2. Deploy the engine EJB. The Engine EJB has a dependency to the configuration from step 1
3. Deploy a configuration, which has a dependency to step 1 and binds an implementation of
GlobalInterface to JNDI

With this JNDI Name and a cast to GlobalInterface, it is possible for Engine EJB to use implementations
of GlobalInterface, without having any dependency to the configuration of the implementation.
Now it is possible to add dynamicly more implementations. The engine EJB needs only the JNDI
Name, which is provided by a DataBase.

Not a very nice solution, but it works ;)

Regards
Jochen




> -----Urspr├╝ngliche Nachricht-----
> Von: user@geronimo.apache.org
> Gesendet: 09.12.07 23:37:33
> An: user@geronimo.apache.org
> Betreff: Re: Dynamic dependency for external EJBs


> 
> 
> 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
> 
> 


_______________________________________________________________________
Jetzt neu! Sch├╝tzen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220


Mime
View raw message