beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Schoettger" <>
Subject Re: ResultSet Already Closed
Date Mon, 27 Nov 2006 23:03:07 GMT
I think this may be an issue that has to do with a slightly different
controls lifecycle when testing a control using the ControlTestCase
base class for JUnit testing.

The JDBC control will close the JDBC connection when it receives an
'onRelease' life cycle event.

When JUnit testing the ControlTestCase sends this event during the
JUnit 'tearDown()' call.

If when running on the server, you are using the JDBC control from a
page flow, the onRelease event will be sent after you make a call to
the JDBC control.  If this is case where you are seeing the failure
this is most likely what is happening.

You may be able to work around this issue by creating a custom control
which contains your JDBC control.  This has the net effect of not
invoking the onRelease() method of the JDBC control until the call to
the outer custom control has been completed.

  - Chad

On 11/27/06, Greg Mally <> wrote:
> What version of WebLogic are you using?
>   -- Greg
> On 11/22/06, Kunnath, Radjhakrishnan [HCSUS Non-J&J] <>
> wrote:
> >
> > Hello,
> >
> > I am using a Oracle Stored Proc which returns a result set(refCursor).  I
> > have a JDBC Control which uses the Oralce Stored Procedure to return the
> > resultset as out parameter. When I unit tested this control in JUnit it
> > worked very well. But When I am using it in my weblogic application server
> > i
> > am getting the error:
> >     java.sql.SQLException: Result set already closed
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > RK
> >
> >

View raw message