2 Replies Latest reply on Jun 10, 2003 2:50 AM by peixubin

    jboss cmp very slow

      like following code,how many sql call ?
      ...
      Collection c=home.findbyXXX();
      Iterator iter=c.iterator();
      while(iter.hasNext()){
      Entity1Local local=(Entity1Local )iter.next();
      iter.getField1();
      iter.getField2();
      iter.getField3();
      iter.getField4();
      ...
      }

      In Jboss's log file ,per getFieldX will sql call.

        • 1. Re: jboss cmp very slow
          lafr

          AFAIK you see this behaviour because you do not have any transactions.
          Whats the transaction attribute of this bean / method ?
          You may set transaction to Required or RequiresNew.

          I recently coded a bean with transaction attribute "Supports" including the finder and the iteration.
          The work on the entity bean is done in separate SLSB with transaction attribute Required.
          So the bean is loaded once an locked in this transaction.

          • 2. Re: jboss cmp very slow

            I set same transaction attribute on all bean.

            very quickly.

            Thank you.