Hy,

sometimes, the database server restart. When the JDBC connection
failed, the UserApplication cannot reconnect to the database.

I need to restart jboss to reconnect the UserApp to the database.

I have modified the oracle configuration file to check the jdbc
connection but it does not worked :


Code:
--------------------
<?xml version="1.0" encoding="UTF-8"?>

<!-- ================================================== =================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ================================================== =================== -->

<!-- $Id: oracle-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
<!-- ================================================== ================== -->
<!-- Datasource config for Oracle originally from Steven Coy -->
<!-- ================================================== ================== -->


<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<!-- <connection-url>jdbcracle:thin:@ar3dv007.generali.fr:1521:INSUTF8D</connection-url>-->
<connection-url>jdbcracle:thin:@172.30.36.74:1521:INSUTF8R</connection-url>
<!--

Here are a couple of the possible OCI configurations.
For more information, see http://otn.oracle.com/docs/products/...a96654/toc.htm

<connection-url>jdbcracleci:@youroracle-tns-name</connection-url>
or
<connection-url>jdbcracleci:@(description=(address=(host=youroraclehost)(pr otocol=tcp)(port=1521))(connect_data=(SERVICE_NAME =yourservicename)))</connection-url>

Clearly, its better to have TNS set up properly.
-->
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>


<user-name>UIAMSP1R0</user-name>
<password>******</password>

<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.Oracle ValidConnectionChecker</valid-connection-checker-class-name-->
<!-- Checks the Oracle error codes and messages for fatal errors -->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.Oracle ExceptionSorter</exception-sorter-class-name>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->

<!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered -->
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<!-- -->

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>

</datasources>
--------------------


--
bratti
------------------------------------------------------------------------
bratti's Profile: http://forums.novell.com/member.php?userid=17862
View this thread: http://forums.novell.com/showthread.php?t=397390