commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DBCP-308) ORA-01453: SET TRANSACTION must be first command of transaction exception with SharedPoolDataSource
Date Sun, 29 Nov 2009 20:39:20 GMT

     [ https://issues.apache.org/jira/browse/DBCP-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Phil Steitz resolved DBCP-308.
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4
                   1.3

This should be resolved in trunk, so will be fixed in 1.3/1.4 releases.  SharedPoolDataSource.setupDefaults
now tests property values before setting them. 

> ORA-01453: SET TRANSACTION must be first command of transaction exception with SharedPoolDataSource
> ---------------------------------------------------------------------------------------------------
>
>                 Key: DBCP-308
>                 URL: https://issues.apache.org/jira/browse/DBCP-308
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>         Environment: JDK 1.5
>            Reporter: Ondrej Tisler
>            Priority: Minor
>             Fix For: 1.3, 1.4
>
>
> When using SharedPoolDataSource I get ORA-01453: SET TRANSACTION exception on con.setReadOnly(isDefaultReadOnly());
in setupDefaults method
> I correct it with code - 
>   protected void setupDefaults(Connection con, String username) throws SQLException {
>     con.rollback();
>     con.setReadOnly(isDefaultReadOnly());
>     con.setAutoCommit(isDefaultAutoCommit());
>     int defaultTransactionIsolation = getDefaultTransactionIsolation();
>     if (defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION) {
>       con.setTransactionIsolation(defaultTransactionIsolation);
>     }
>   }
> rollback is important, without it it ends on same exception ... 
> I'm using 10.1.2.0.2 oracle driver

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message