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:
You should spawn another thread in the start() method.
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).
Right, it won't behave properly. You should implement both start() and stop() (both part of the Startable interface) in your component.
in start(), spawn another thread to do your loop in stop(), terminate that thread. that will fix your #2. -pete
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
