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...
  | 
Here are what I have in Java.

UserLogBean.Java:

  |  * @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"
  | 

Report.java:

  | 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());
  |     ...
  | }
  | 

The problem is that JBoss would execute the above SQL whenever I want to get 
the value of an attribute of [UserLog].

How do I solve this problem?

JBoss: jboss-3.2.5 + xdoclet

Great thanks!
Ming

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3947977#3947977

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3947977


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to