[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5412) Hibernate JPA closes XAConnection on Glassfish v3 with JDBC Wrapping

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Aug 19 15:32:02 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43297#comment-43297 ] 

Steve Ebersole commented on HHH-5412:
-------------------------------------

No idea why you think this is a Hibernate bug.  And you have given us nothing to show that.  Hibernate closes its resources.   In XA usage though it should be able to call close on the Connection it is using because that is a "handle" in the XA verbiage.  Meaning it is supposed to be a dedicated-use wrapper around a physical connection.  I mean to me everything you describe here points to this as a problem in the JCA implementation being used here.

> Hibernate JPA closes XAConnection on Glassfish v3 with JDBC Wrapping
> --------------------------------------------------------------------
>
>                 Key: HHH-5412
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5412
>             Project: Hibernate Core
>          Issue Type: Bug
>         Environment: Glassfish v 3
>            Reporter: Radosław Smogura
>            Priority: Critical
>
> In EJB application at 90% the Hibernate closes original physicall connectiont o XA database. This problem occurs when JDBC Object wrapping is turned on in Glassfiah admin console. 
> This bug is "upstream" of this https://glassfish.dev.java.net/issues/show_bug.cgi?id=11846.
> Orginal initial comment, and some comments:
> ----------------------
> I use PostgreSQL 8.4 with trunk and stable driver. When I use statement caching
> with wrapping original objects I got exception that statement is closed. My
> investigation shwn close of original Polled Connection in
> com.sun.gjc.spi.ManagedConnection.transactionCompleted.  Problem disappears
> after few calls of same statement. This problem doesn't occurs when wrapping is
> turned off. In both cases I use XA poll.
> Caused by: org.postgresql.util.PSQLException: Statement has been closed.
>         at
> org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:448)
>         at $Proxy227.clearParameters(Unknown Source)
>         at
> com.sun.gjc.spi.base.PreparedStatementWrapper.clearParameters(PreparedStatementWrapper.java:380)
>         at
> com.sun.gjc.spi.base.PreparedStatementWrapper.close(PreparedStatementWrapper.java:755)
>         at
> org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:563)
> -----------------
> This problem isn't visible if PooligDatasource is used.
> -----------------
> I used 3.5.2 Release and it's looks same. Before 1st submiting bug I
> thought that this is GF problem, becasue in EJB I was trying to get
> XAConnection by resource injection and same problem occured (this EJB was mixed
> Hibernate + JDBC), but now i'm going to point that this is Hibernate problem.
> I'll do some other checks, and if this will be Hibernate problem I'll fill bug
> in Hib.
> I created application without Hibernate (old plain JNDI) and it looks that
> there is no error - so this coud be hibernate. But i want to do more test,
> about this (eg. take XAConnection from server global JNDI, without
> java:comp/env).
> -----------------
> ---
> Kind regards,
> Radosław Smogura
> http://www.softperience.eu

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list