Re: JBoss keeps sending select 'hello' from dual

  • From: "Martin Busik" <martin.busik@xxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 24 Oct 2008 17:19:00 +0200

Hello, 
you can configure the "is session alive?" in the datasource, e.g.:

  <local-tx-datasource>
    <jndi-name>name</jndi-name>
   <connection-url>jdbc:oracle:thin:@...</connection-url>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.
OracleValidConnectionChecker</valid-connection-checker-class-name>

This is the default implementation. You can remove it.

Another way to perform "something" upon getConnection() is to set the
<new-connection-sql> Parameter, e.g.:

<new-connection-sql>alter session set events '10046 trace name context
forever, level 8'</new-connection-sql>

or simly:

<new-connection-sql>begin null; end;</new-connection-sql>

Cheers,
Martin

--
//www.freelists.org/webpage/oracle-l


Other related posts: