SourceForge has been redesigned. Learn more.
Close

How to reuse the opened session

Developers
srinivas
2003-09-16
2003-09-16
  • srinivas

    srinivas - 2003-09-16

    Hi,
    Can I use the same opened session for update from 1 table and again for querying from another table.I am doing the following and getting 'Connection is busy with another hstmt'

    dbSession = session.beginTransaction();
    Cat Pricess  = new Cat();
    princess.setName("Princess");
    princess.setSex('F');
    dbSession.save(princess);
    dbSession.connection(commit);
    dbSession.close();

    dbSession = session.beginTransaction();
    //Logic for querying from some table
    dbSession.close();

    Any Help greatly appreciated

    Thanks in advance.
    Srinivas

     
    • Matt Raible

      Matt Raible - 2003-09-16

      This looks like a Hibernate question - have you tried asking on their forums?

       
    • srinivas

      srinivas - 2003-09-16

      Yes

       

Log in to post a comment.