Hello guys
Sorry if I posted to the wrong category.
I have been googling for an answer for 2 days with no luck.
I'm new to Jboss & Ejb and asked to debug an ejb application :( .
I found that the application is too slow due to repeat executing the same SQL query:
(extracted from server.log)
2006-05-31 18:30:42,357 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserLog] Executing SQL: SELECT location, action, serial, logged FROM krypton_log_user WHERE (id=?) 2006-05-31 18:30:42,358 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserLog] Executing SQL: SELECT location, action, serial, logged FROM krypton_log_user WHERE (id=?) 2006-05-31 18:30:42,360 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserLog] Executing SQL: SELECT location, action, serial, logged FROM krypton_log_user WHERE (id=?) ... a lot more...
* @ejb.bean name="UserLog" jndi-name="krypton/log/UserLog" local-jndi-name="krypton/log/UserLogLocal" * @ejb.persistence table-name="krypton_log_user" * @ejb.util generate="physical" * * @ejb.finder role-name="user" signature="java.util.Collection findByKioskDateRange(java.lang.String kiosk, java.util.Date start, java.util.Date end)" query="SELECT OBJECT(log) FROM UserLog AS log WHERE log.kioskSerial=?1 AND log.logged > ?2 AND log.logged < ?3 ORDER BY log.logged"
Collection entries = this.findLogEntries(kiosk, day.getTime(), end.getTime()); Iterator it = entries.iterator(); while (it.hasNext()) { UserLog entry = (UserLog)it.next(); System.out.println("entry.getDate() = "+entry.getDate()); ... }