Hi, i dont know if this is a strange behavior, maybe all is fine.
i have a simple cmp bean(Minfo), one table. i get my bean this way: | Collection c = getHome().findByName(fileName); | Object[] obj = c.toArray(); | for(int j = 0; j < obj.length; j++) { | Minfo info = null; | if (obj[j] instanceof Minfo) info = (Minfo)obj[j]; | System.out.println(info.getId()); | } | Every time info.getId() is called, jboss makes a SQL-Query, six calls of getId() produce this in my server.log: | Executing SQL: SELECT id,filename, extension, disk, size, id3title, id3artist, id3length, id3bitrate FROM minfo WHERE (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) | Executing SQL: SELECT id,filename, extension, disk, size, id3title, id3artist, id3length, id3bitrate FROM minfo WHERE (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) | Executing SQL: SELECT id,filename, extension, disk, size, id3title, id3artist, id3length, id3bitrate FROM minfo WHERE (id=?) OR (id=?) OR (id=?) OR (id=?) | Executing SQL: SELECT id,filename, extension, disk, size, id3title, id3artist, id3length, id3bitrate FROM minfo WHERE (id=?) OR (id=?) OR (id=?) | Executing SQL: SELECT id,filename, extension, disk, size, id3title, id3artist, id3length, id3bitrate FROM minfo WHERE (id=?) OR (id=?) | Executing SQL: SELECT filename, extension, disk, size, id3title, id3artist, id3length, id3bitrate FROM minfo WHERE (id=?) | every one more call of getId() is one less "OR (id=?) " in the sql-query. i ask this because i have performance problems if i call get-methods. thanks a lot View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841499#3841499 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841499 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user