[jboss-user] [JCA/JBoss] - JBoss changing database connection on bean, thus loosing tem

sbglasius do-not-reply at jboss.com
Mon Sep 11 05:32:33 EDT 2006


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:

  |     <no-tx-datasource>
  |         <jndi-name>jdbc/DISY</jndi-name>
  | <connection-url>jdbc:sybase:Tds:host:4002/database?AUTOCOMMIT=TRUE</connection-url>
  |         <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
  |         <user-name>user</user-name>
  |         <password>pwd</password>
  |         <min-pool-size>5</min-pool-size>
  |         <max-pool-size>100</max-pool-size>
  |         <idle-timeout-minutes>30</idle-timeout-minutes>
  | <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
  |         <new-connection-sql>select 1 where 2=1</new-connection-sql>
  |         <check-valid-connection-sql>select 1 where 2=1</check-valid-connection-sql>
  |         <metadata>
  |             <type-mapping>Sybase</type-mapping>
  |         </metadata>
  |     </no-tx-datasource>
  | </datasources>

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

Best regards,
Søren Berg Glasius

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970688#3970688

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970688

More information about the jboss-user mailing list