Consultor Eletrônico



Kbase P75451: How to get info about transaction isolation level etc. when using JBOSS
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/8/2004
Status: Unverified

GOAL:

How to get info about transaction isolation level etc. when using JBOSS

FACT(s) (Environment):

Progress 9.1D

FIX:

When you work with your data source you should have within JBOSS code
which looks similar to that:

Connection connection = dataSource.getConnection();
try
{
// DO WORK
}
finally
{
try
{
connection.close();
}
catch (Throwable ignored)
{
}
}

Add the following code like seen below to get the requested
information:

Connection connection = dataSource.getConnection();
try
{

System.out.println("Is the connection : " + connection + "\nREAD-ONLY ?
:" + connection.isReadOnly());

System.out.println("The Transaction isolation level is : " +
connection.getTransactionIsolation());

System.out.println("AutoCommit is : " + connection.getAutoCommit());


// DO WORK
}
finally
{
try
{
connection.close();
}
catch (Throwable ignored)
{
}
}