7 Replies Latest reply on Aug 28, 2002 4:12 PM by Dain Sundstrom

    Many SQL for getXXX method

    Jaime Salvador Newbie

      Hi

      I have a CMP entity bean and I make a finder method "Collection finByName( )".

      When I execute the finder inside a method of a class (not a session or entity bean), the finder executes without problems, but when I narrow each item of the collection to my remote class and I execute "getXXX", one SQL is executed for each item in the collection, it's ver, very slow!!!!!.

      But, if I excute the finder inside a method of a session bean, an iterate for each item in the collection, narrow each item to my remote interface and execute "getXXX", only one SQL is execute for all the items in the collection, it's right that I neen!!!!

      Somebody knows what is the problem???

      JBoss 3.0
      Win2000 Proffesional
      JDK 1.3

      J@imeS

      Jaime Salvador