Consultor Eletrônico



Kbase P118086: SQL:  Can the TRANSACTION ISOLATION LEVEL be set inside an SQL JAVA STORED PROCEDURE?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   29/06/2009
Status: Verified

GOAL:

SQL: Can the TRANSACTION ISOLATION LEVEL be set inside an SQL JAVA STORED PROCEDURE?

GOAL:

Can the TRANSACTION ISOLATION LEVEL be set inside an SQL JAVA TRIGGER?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

No. Since the transaction isolation level is a property of the client's connection object, and the connection object may not be instantiated inside a stored procedure, the transaction isolation level may be set only by the client through setting the desired connection object property.
For example, the client can set the transaction isolation level to the desired value before calling the stored procedure. This transaction isolation level will stay in effect till the end of the current transaction or till it is explicitly changed by the client.
different clients have different syntax for setting their connection object's transaction isolation level. For example, a JAVA client uses the following syntax to set its connection object's transaction isolation level :
sqlConnSession.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
sqlConnSession.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
sqlConnSession.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE);
sqlConnSession.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
For other SQL clients, consult the client vendor documentation for the appropriate syntax.