Apache Geronimo > Discussion Forums  User List | Dev List | Wiki | Issue Tracker  

Redeploying Depended on Applications

View: New views
3 Messages — Rating Filter:   Alert me  

Redeploying Depended on Applications

by Q Beukes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey,

Lets say I have 3 EJB JARs, A, B and C. A is independant. B depends on
A. C depends on B. So from parent to child it is: A->B->C.

What happens when I undeploy B and immediately redeploy it? How does
OpenEJB/Geronimo handle this, and what if instances of B's EJBs were
already injected into C's EJBs? Can this happen transparently? We can
assume that the redeploy does not change any of the @Local or @Remote
interface APIs - in such a case a larger redeploy would be done in any
case.

I'm not sure how these references are handled with the proxies, and
want to know how I should set up my "minor revision" upgrade
procedures.

Q

Quintin Beukes

Re: Redeploying Depended on Applications

by djencks :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 26, 2009, at 10:43 AM, Quintin Beukes wrote:

> Hey,
>
> Lets say I have 3 EJB JARs, A, B and C. A is independant. B depends on
> A. C depends on B. So from parent to child it is: A->B->C.
>
> What happens when I undeploy B and immediately redeploy it? How does
> OpenEJB/Geronimo handle this, and what if instances of B's EJBs were
> already injected into C's EJBs? Can this happen transparently? We can
> assume that the redeploy does not change any of the @Local or @Remote
> interface APIs - in such a case a larger redeploy would be done in any
> case.

There's a redeploy command, which, if applied to a plugin X, will stop  
plugins that depend on it, keeping track of what got stopped, undeploy  
X, deploy the new X, and start the stuff that got stopped.  However,  
if you undeploy X that will stop all the dependencies and deploying  
new-X will not start them again.

I don't know how reliable this is, but IIUC the code is all there in  
SimpleConfigurationManager and possibly KernelConfigurationManager.

So, in your case, if you redeploy B, C will get stopped while B is  
being undeployed/deployed and then restarted, at which point it will  
pick up new injected ejbs from A and B.

>
> I'm not sure how these references are handled with the proxies, and
> want to know how I should set up my "minor revision" upgrade
> procedures.

Please try this out in a real world situation and let us know how well  
it works.

thanks
david jencks

>
> Q
>
> Quintin Beukes


Re: Redeploying Depended on Applications

by Quintin Beukes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> So, in your case, if you redeploy B, C will get stopped while B is being
> undeployed/deployed and then restarted, at which point it will pick up new
> injected ejbs from A and B.

This makes sense. I assume from your message, though, that
applications are treated as plugins internally?

>> I'm not sure how these references are handled with the proxies, and
>> want to know how I should set up my "minor revision" upgrade
>> procedures.
>
> Please try this out in a real world situation and let us know how well it
> works.

Will do. It's not a big problem if connections are lost. As long as
it's possible to redeploy without having to do so with all
applications and/or restart the server.

Q