views:

186

answers:

2

We currently have batchjobs in Java that proces mulitple (sometimes large) files. These jobs can take some time to run. We run these files directly in the JVM, using Java Threads that continuesly run in a loop. (proces files and then wait a while).

Now the company I work for, wants to run these jobs in the Weblogic application server. Not because it's better, but because that's the company's standard platform.

A potential problem I see is that BEA weblogic monitors all threads and default says that threads that run longer then 10 minutes are STUCK threads, which can potentially lead to a server in FAILED state.

What is the best practice to do this in BEA Weblogic?

+2  A: 

BEA Weblogic monitors only request threads against a certain time. For threads that are generated by request handling code, it does not. We have used Quartz (from OpenSymphony) scheduler to schedule job in Weblogic that used to take upto 3-4 hours to finish.

Sandy
+1  A: 

Weblogic Servers provide WorkManagers which supports longer thread running time and are optimized for long work (generally speaking they are a Framework around the good old ThreadPools). For WorkManagers you can define the MaxThreadStuckTime, the time after which a thread is accounted as stuck and likely killed.

ma-ver-ick