0 Replies Latest reply on Dec 5, 2006 5:50 AM by Salvatore Passerini

    JMS TCP connections

    Salvatore Passerini Newbie

      Hi.
      I need to implement an async path in my process and I decided to use a JMS queue and an MDB.
      In an ActionHandler I have:

      [...]
       public void execute(ExecutionContext context) throws Exception {
       ...
       long tid = context.getProcessInstance().getId();
       LocalCoreManager coreManager = lookupLocalCoreManager();
       coreManager.publish(tid, messageCode);
       ...
       JbpmContext jbpmContext = context.getJbpmContext();
       jbpmContext.close();
       }


      At this point my process enter the Wait State "Queued", then, asynchronously, the MDB loads the process instance and signals it.
      Everything seems to work ok BUT...I've noticed that I have dozens of open TCP connections to the port 8093.
      This leads to an OutOfMemoryException on Windows and to a "too many files open in system" on linux.
      The code of coreManager.publish is ok because if I call the bean from inside a Junit test I can publish and the connections are correctly closed. So it appears that the problem is to publish jms messages from inside jbpm.

      Do you have suggestions?

      Thankyou
      Salvatore

      P.S. I use jboss 4.0.4GA and jbpm 3.1.2 but I've tryed also jboss 4.0.5 and jbpm 3.1.3