Why do i get a resultset object from the session closed? - Websphere

This is a discussion on Why do i get a resultset object from the session closed? - Websphere ; I've been working on a web app to display the information from a db2 table. So the user connects to a servlet that creates an object that acts like a bean , meaning that it has members for all the ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Why do i get a resultset object from the session closed?

  1. Why do i get a resultset object from the session closed?

    I've been working on a web app to display the information from a db2 table. So the user connects to a servlet that creates an object that acts like a bean , meaning that it has members for all the columns in the table and a member for the connection , the resultset and the statement .
    The connection is made with connection pooling .
    After creating this sort-of bean i place it in the session of the request .
    After displaying the information the users can modify it or click on a row and view that information .
    This means that a servlet is called and retrieves the bean from the session where i put it . This is ok, all the information is there but for the ResultSet which is closed ,
    also the Statement is closed .
    I really don't know what happens .
    Hope you have some ideea .

    PS :In order to get the project going i'm doing a new executeQuery after retrieving the bean from the session to have an opened ResultSet.

  2. Re: Why do i get a resultset object from the session closed?

    you can try CachedRowSet,this class is provided by Sun in order to retrieve data in despite of the closed connection.
    You can reach it at Sun's website.rowset.jar

  3. Re: Why do i get a resultset object from the session closed?

    Sorry but i think i expressed myself very badly.
    My problem isn't that the connection is closed (which isn't), but the fact that when i retrieve the bean (and also the resultset which is a member of the class) , all other members have their data intact (for instance my m_cState is a 'c' ) but the statement and the resultset appear closed

  4. Re: Why do i get a resultset object from the session closed?

    Does the statement handles differently if it is made by two types of connection . I am interested in AS400JDBCConnection and WS400JDBCConnection .

  5. Re: Why do i get a resultset object from the session closed?

    It sounds like you may be abusing some of the JDBC stuff and using some
    less than best practices by keeping database objects around instead of
    using data access objects to build collections of business objects for
    your app.

+ Reply to Thread