0 Replies Latest reply on Sep 17, 2012 4:31 PM by Eduardo Mello Cantú

    StreamGobbler with javax.resource.spi.work.Work inside EJB

    Eduardo Mello Cantú Newbie

      Hey all,

       

      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.

       

      I'm using JBoss AS 4.2.3.GA.