[wildfly-dev] Running Batch During Undeploy
James R. Perkins
jperkins at redhat.com
Thu Sep 19 23:28:02 EDT 2013
On 09/19/2013 06:07 PM, David M. Lloyd wrote:
> On 09/19/2013 07:06 PM, James R. Perkins wrote:
>> While doing some testing with batch we discovered somewhat of a corner
>> case in where you have submitted a batch job then decided to explicitly
>> undeploy the application or something triggers an undeploy. The batch
>> thread will continue to run which causes issues if the start on the
>> batch is called again. My theory is the old batch environment is being
>> used as it's still alive in the thread.
>>
>> This begs the question though what should happen if a batch job is
>> running and an undeploy is invoked? Should we fail the undeploy? Should
>> we kill all batch jobs (probably not ideal)? Luckily for us the spec
>> says... ...nothing.
> The service controlling the thread (pool?) will depend on the
> deployment. When the deployment is stopped, the thread pool is shut
> down and all executing threads are interrupted. The service then waits
> until the the thread pool terminates before completing the undeploy.
>
> The key is to make sure the thread pool service depends on the deployment.
>
Hmm... ...maybe my theory on what is happening is wrong then. I'll have
to debug it a bit more. That makes sense what you're saying though.
--
James R. Perkins
Red Hat JBoss Middleware
More information about the wildfly-dev
mailing list