Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to find which sql statements are executed in a transaction on Websphere AS 7.0?
    text
    copied!<p>I have a <code>Websphere Application Server 7.0.0.9</code>, on which an application is running that uses <code>springframework 2.0.9</code> and <code>hibernate 3.3.0</code> (or 3.4.0, or both, I'm not sure). TransactionManager is <code>org.springframework.transaction.jta.WebSphereUowTransactionManager</code>.</p> <p>I have a method that is annotated as <code>@org.springframework.transaction.annotation.Transactional</code>. This method calls another method that is also annotated as <code>@org.springframework.transaction.annotation.Transactional</code>:</p> <pre><code>@Transactional public void myMethod() { doSomeUpdates(); nestedMethod(); } @Transactional public void nestedMethod() { doSomeMoreUpdates(); } </code></pre> <p>The method "myMethod" is supposed to be atomary. Sometimes there is a bug when updates from "doSomeUpdates" are rolled back, but updates from "doSomeMoreUpdates" are commited.</p> <p>Default propagation settings are <code>Propagation.REQUIRED</code>. I tried changing my code to:</p> <pre><code>@Transactional public void myMethod() { doSomeUpdates(); nestedMethod(); } @Transactional(propagation = Propagation.MANDATORY) public void nestedMethod() { doSomeMoreUpdates(); } </code></pre> <p>I tried looking in logs to find whether this change has solved my bug, but cannot make no heads no tails of the quagmire that is my log files. I'm logging sql statements via org.hibernate.jdbc.util.SQLStatementLogger class, and dump transactional trivia to websphere's trace.log file with the following settings:</p> <pre><code>com.ibm.wsspi.uow.*=finest: com.ibm.ws.uow.*=finest: com.ibm.ws.jtaextensions.*=finest: org.hibernate.transaction.*=finest: org.springframework.transaction.*=finest: com.ibm.ws.Transaction.*=finest: com.ibm.ws.LocalTransaction.*=finest: com.ibm.ws.tx.*=finest: oracle.jdbc.*=finest: </code></pre> <p>This produces <i>heaps</i> of useless data, but sql statements are dumped <i>only</i> by SQLStatementLogger that, it looks like, doesn't have anything to do with websphere transactions. How can I see which sql statements are really executed by websphere in each transaction?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload