3 Replies Latest reply on Aug 14, 2007 3:20 PM by Tonio Caputo

    Problem calling nested methods or nested EJB

    Tonio Caputo Newbie

      Hi everybody I'm using 4.0.5-EJB3 with JPA,

      I'm having serious trouble with JTA, it appears to me
      that it is not closing session when nested methods are called,
      or between 2 EJB not deployed in the same ear.

      1st CASE =================================================
      First, my bean schema, Transaction Attribute is REQUIRED
      for al methods:

       List<Integer> getBeingId (String documentNumber);
       List<Beings> getBeings(List<Integer> beingsId);
       List<Beings> getBeingsWithAddress(String documentNumber) {
       for ( Beings b: bgs )
       return bgs;

      If I call from my remote client getBeingsWithAddress() the
      memory consuption is continuosly increasing at increadible
      speed, and after 1000 or so called, an OutOfMemory is received.

      A workaround:
      If I put all the function of getBeingsId()/getBeings() in
      getBeingsWithAddress() it works fine.

      Another solution was to use TransactionType.SUPPORTS in
      getBeingsWithAddress() (of course not searching for addresses in this case)

      2nd CASE =================================================
      If getBeingsWithAddress() is a method deployed in an another ear, there
      is no way to stop JBOSS consuming memory.

      I've tried a lot of strange stuff, alway the same bad result.

      Any help will be greatly welcomed
      (In the meanwhile I'm trying to upgrade to 4.2, but I'm having some trouble still)