0 Replies Latest reply on Sep 11, 2006 5:32 AM by Soeren Berg Glasius

    JBoss changing database connection on bean, thus loosing tem

    Soeren Berg Glasius Newbie


      First: Hope this is the right forum to ask this question.

      We have this older system that we have ported from SilverStream to JBoss, and almost everything is working fine. One problem though.

      Background on the system. We have a thich java client, the appserver and a Sybase 12.5.x database server. We do not use transactions (eg. we use a non-tx datasource) - and we run with autocommit on (for historical reasons).

      We have an app, which accesses a tempdb on Sybase through a statefull sessionbean. The client must do some client calculations, and return to the sessionbean several times during an iteration. In the session bean we create a tempdb, which on sybase will disapear again, when the connection closes (eg. is returned to the pool). How do we make sure, that this database connection obtained when creating the tempdb is retained during the sessionbean lifetime?

      This is our database connector:

       <new-connection-sql>select 1 where 2=1</new-connection-sql>
       <check-valid-connection-sql>select 1 where 2=1</check-valid-connection-sql>

      Any suggestions in what direction to search will be greatly appreciated!

      Best regards,
      Søren Berg Glasius