This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Display datasource isolation level Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Display datasource isolation level" Watch "Display datasource isolation level" New topic

Display datasource isolation level

Sugantha Jeevankumar
Ranch Hand

Joined: Jun 06, 2007
Posts: 92
Hi All.. I just want to know if there is a way to display the actual transaction isolation level used by my JBoss datasource. My datasource configuration looks like below,

I understand MySql uses TRANSACTION_REPEATABLE_READ by default and I am trying to override it with TRANSACTION_READ_COMMITTED for all transactions originating from my application. Is there anyway to check, if the datasource is indeed using TRANSACTION_READ_COMMITTED. JBoss' JMX console did not show much under "name=template/datasource,service=DataSourceBinding" node and server.log also did not reveal much. Any help is appreciated.

SCJP 5.0
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9912

You'll have to check it on the Connection object returned by the DataSource. For example:

[My Blog] [JavaRanch Journal]
Sugantha Jeevankumar
Ranch Hand

Joined: Jun 06, 2007
Posts: 92
Thanks Jaikiran.. I was hoping there would be a non-intrusive way to do this, since I need to check the isolation level in use in a production machine. Any more suggestions are welcome.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Display datasource isolation level
Similar Threads
Got NullPointer exception when injecting EntityManger
javax.persistence. TransactionRequiredException
fail over in jdc URL
How to make a data source connection without writing a User name & Password and the -ds.xml file
javax.resource.ResourceException: Unable to get managed connection for NeoDataSource