[ 
https://issues.apache.org/jira/browse/OPENJPA-1036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698778#action_12698778
 ] 

Bogdan Stroe commented on OPENJPA-1036:
---------------------------------------

The configuration fix proposed in OPENJPA-375 does not work for XA connections.
We changed the value of "resultSetHoldability" custom property of the DB2 
datasource to 1 and now we get this error:
00000052 SystemErr     R   Caused by: java.lang.Exception: 
org.apache.openjpa.lib.jdbc.ReportingSQLException: 
[ibm][db2][jcc][10341][11670] An SQL OPEN for a held cursor was issued on a XA 
connection {prepstmnt 330306480 SELECT....

The cause of this error is described here:
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.java.doc/doc/rjvjcsqc.htm

-4496   An SQL OPEN for a held cursor was issued on an XA connection. The JDBC 
driver does not allow a held cursor to be opened on the DB2(R) server for an XA 
connection.

> CLONE -DB2 autoCommit(true) causes Result Set prematurely closed in 
> WebContainer JEE environment.
> -------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1036
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1036
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.0.0, 1.0.1, 1.1.0
>            Reporter: Bogdan Stroe
>            Assignee: Catalina Wei
>             Fix For: 1.0.1, 1.1.0
>
>
> Invalid operation: Result set is closed is reported from DB2, running in Web 
> Container, non-jta-data-source, transaction local, JEE environment.
> A workaround is to set the following property in persistence.xml for DB2:
> <property name="openjpa.jdbc.DBDictionary"
>             value="db2(supportsMultipleNontransactionalResultSets=false)"/>

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

Reply via email to