Re: [JBoss-user] SQL query tracing -- how?
Hi, depending on database and system there are several SQL-Tracing tools available, try searching your DB providers web-site, mailinglists, newsgroups for appropriate tools... Burkhard - Original Message - From: "Jason Wells" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 2:45 AM Subject: [JBoss-user] SQL query tracing -- how? > Hello, > > I'm running JBoss 2.1, and I need to turn on SQL tracing so that I can debug > a BMP entity bean I'm working on. I'm trying to get my server.log to give me > output like this: > > ... > [JAWS] Exists SQL: SELECT COUNT(*) FROM UnitStatus WHERE id=? > [JAWS] findAllStatus SQL: SELECT id FROM UnitStatus > [JAWS] Create SQL: INSERT INTO UnitStatus (priority,speed,heading,lat) > VALUES (?,?,?,?) > [JAWS] Remove SQL: DELETE FROM UnitStatus WHERE id=? > ... > > I found no mention of debug in the JBoss docs, but when I searched through > the list archive I actually found what appeared to be the answer. It said: > > "add true to your jaws.xml, at the 'top' level (within the > tag, but not in any other. Also, make sure that you're allowing debug > level logs to be output." > > The first part is clear enough, and I took the last part of the instructions > ("allow debug level logs to be output") to mean that for my database > connection pool in jboss.jcml, set the "LoggingEnabled" attribute to true. > Which I did. However, I don't get any SQL statements in either the JBoss > console output or in server.log. > > I assume that I misunderstand the last part. What am I doing wrong? > > Thanks in advance. > -- > Jason Wells > Web Architect > Xsilogy, Inc. > http://www.xsilogy.com/ > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] SQL query tracing -- how?
I believe that you'll have to provide the logging yourself - JAWS handles only the CMP beans, so the settings in jaws.xml will only affect SQL from CMP beans. BMP beans talk directly to the database via connections, statements, etc. If there were a logging feature for BMP beans it would be in your connection pool (datasource); I don't know of any that have this feature, though. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Wells Sent: Wednesday, May 23, 2001 8:46 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] SQL query tracing -- how? Hello, I'm running JBoss 2.1, and I need to turn on SQL tracing so that I can debug a BMP entity bean I'm working on. I'm trying to get my server.log to give me output like this: ... [JAWS] Exists SQL: SELECT COUNT(*) FROM UnitStatus WHERE id=? [JAWS] findAllStatus SQL: SELECT id FROM UnitStatus [JAWS] Create SQL: INSERT INTO UnitStatus (priority,speed,heading,lat) VALUES (?,?,?,?) [JAWS] Remove SQL: DELETE FROM UnitStatus WHERE id=? ... I found no mention of debug in the JBoss docs, but when I searched through the list archive I actually found what appeared to be the answer. It said: "add true to your jaws.xml, at the 'top' level (within the tag, but not in any other. Also, make sure that you're allowing debug level logs to be output." The first part is clear enough, and I took the last part of the instructions ("allow debug level logs to be output") to mean that for my database connection pool in jboss.jcml, set the "LoggingEnabled" attribute to true. Which I did. However, I don't get any SQL statements in either the JBoss console output or in server.log. I assume that I misunderstand the last part. What am I doing wrong? Thanks in advance. -- Jason Wells Web Architect Xsilogy, Inc. http://www.xsilogy.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user