AW: [OJB-developers] RsIterator.releaseDbResources
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-01-25 11:27:00
|
Oops, I thought I fixed this already. Must be a problem with my local CVS = server. I will fix it in the next release ! thanks, Thomas > -----Urspr=FCngliche Nachricht----- > Von: Darren Syzling [mailto:Dar...@cw...] > Gesendet: Freitag, 25. Januar 2002 11:36 > An: obj...@li... > Betreff: [OJB-developers] RsIterator.releaseDbResources >=20 >=20 > Hi, >=20 > We're using Object Bridge 0.7.310 with SQL Server 7.0 (MS SQL=20 > Server JDBC > drivers) and when indirectly using anything which uses=20 > RsIterator the drivers > are complaining that the driver object has been closed. =20 > Here's the stack trace: >=20 > java.sql.SQLException: [Microsoft][SQLServer JDBC=20 > Driver]Object has been closed. > at=20 > com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) > at=20 > com.microsoft.jdbc.base.BaseResultSet.validateClosedState(Unknown > Source) > at=20 > com.microsoft.jdbc.base.BaseResultSet.getStatement(Unknown Source) > at > ojb.broker.accesslayer.RsIterator.releaseDbResources(RsIterato > r.java:304) > at = ojb.broker.accesslayer.RsIterator.hasNext(RsIterator.java:109) > at > ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery > (PersistenceBrokerImpl.java:808) > at > ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery > (PersistenceBrokerImpl.java:878) > at > ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery > (PersistenceBrokerImpl.java:943) > at > ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery > (PersistenceBrokerImpl.java:933) >=20 > The code in RsIterator.releaseDbResources looks like this: >=20 > try > { > m_rs.close(); > Statement stmt =3D m_rs.getStatement(); > if (stmt !=3D null) > { > stmt.close(); > } > m_rs =3D null; > } >=20 > It appears that the result set is closed before returning the=20 > statement that > produced it, should this be: >=20 > Statement stmt =3D m_rs.getStatement(); > m_rs.close(); > if (stmt !=3D null) > stmt.close(); > ... >=20 >=20 > Regards > Darren >=20 >=20 >=20 > ************************************************************** > ************************************************************** > ************************** > This e-mail has been prepared using information believed by=20 > the author to be > reliable and accurate, but Thales Information Systems Finance=20 > makes no > warranty as to accuracy or completeness. In particular=20 > Thales Information > Systems Finance does not accept responsibility for =20 > changes made to this > e-mail after it was sent. Any opinions expressed in this=20 > document are those of > the author and do not necessarily reflect the opinions of=20 > the company or its > affiliates. They may be subject to change without notice. > This e-mail, its content and any files transmitted with=20 > it are intended > solely for the addressee(s) and may be legally =20 > privileged and/or > confidential. Access by any other party is unauthorised=20 > without the express > written permission of the sender. If you have received this=20 > e-mail in error you > may not copy or use the contents, attachments or=20 > information in any way. > Please destroy it and contact the sender via the Thales=20 > Information Systems > Finance switchboard in London at +44 (0) 20 7650 0100 or via=20 > e-mail return. > This message and any attachments have been scanned > for viruses prior to leaving the originators network. The=20 > originator does not > guarantee the security of this message and will not be=20 > responsible for any > damages arising from any alteration of this message by a=20 > third party or as a > result of any virus being passed on. > ************************************************************** > ************************************************************** > *************************** >=20 >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |