Timothy Bennett wrote:
I'm attempt to wrap a legacy application in a Phoenix block and run it the container...
If I implement the Startable interface in my Phoenix block and there's some code that looks like this in the start() method:
=============== while (true) {
try { SomeObject obj = blockOnThisMethod(); } catch (ShutdownException se) { break; }
// we're done now...
}
================
The start mechos must return to the cal[ling container ASAP otherwise you lock up the thread that is invoking start. What your doing is only practical if you have an assurance that every component is being run in a unique thread (wich is not assumed). Like Pete said - create a new thread and do you stuff there.
Cheers, Steve.
Does this code behave properly in a Phoenix container? I'm thinking not, because I've noticed two things happen when I deploy this SAR.
(1) Any additional SAR(s) in my apps directory that is supposed to have their lifecycle invoked by Phoenix will in fact NEVER initiate and start. (2) When I shut the Phoenix server down, the JVM never terminates until a timeout occurs that forcibly kills the Phoenix process. (Thus no apparent clean shutdown).
Comments? Feedback? Confirmation?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Stephen J. McConnell mailto:[EMAIL PROTECTED] http://www.osm.net
Sent via James running under Merlin as an NT service.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
