9 Replies Latest reply on Apr 26, 2013 9:38 AM by crytek

    Memory leak when calling injected stateless beans from MDB

    crytek

      When a simple MDB, with an empty onMessage(Message arg0) method, consumes messages faster then they arrive on the queue, the memory evolution inside the jconsole is stable.

      However, when you have an injected stateless bean inside the MDB, and call it every time a message is received, the memory inside the Jconsole increases constantly, although the MDB consumes faster then it receives messages (messages DO NOT gather on the queue).

       

      E.g.

       

      public class MdbConsumer_1 implements MessageListener {

       

          @EJB

          MessageCounterFacade msgCounterBean;

       

           @Override

          public void onMessage(Message msg) {

               msgCounterBean.incrementCounter(1);

          }

      }

       

       

      Any thoughts on this issue ?