tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy <>
Subject Re: starting a process from a stateless EJB
Date Fri, 28 May 2010 17:21:18 GMT
You can do anything you want in an EJB, as long as you understand the 
lifecycle of an EJB. The only question here is if you want to keep hold 
of the process?

If you do, then use a stateful bean. If not then just fire and forget 
the process in a stateless bean. I run a fire and forget process for a 
database backup in postgresql - the same bean has methods to poll the 
external process for state.

However, don't expect the stateful bean to be able to passivate and 
restore the process without some additional code. Also keep clustering 
in mind - not that you will use clustering, but I find it helps govern 
the thought process for the design. Try to make all your beans cluster 


View raw message