I have a Stateless EJB that does a "Runtime.getRuntime().exec" and uses a StreamGlobbers around the process inputStream and errorStream. Each one of the gobblers has a "javax.resource.spi.work.Work" related (started by a WorkManager).
As the gobbler syncronize the reading with the worker, am I breaking any ejb 3.0 contract? Because I use lots of waits, notifies and interrupts.
Also, in order to prevent the system to wait forever on the "process.waitFor();", I've created a "java.util.Timer" that causes the current Thread to interrupt.