Hi all,

I have third party application installed on Tomcat 8.5.

The application uses DB Oracle connection (ojdbc7) and everything working
fine.

I would like to set session parameter on first db connect (alter session
set NLS_NUMERIC_CHARACTERS = '.,')

I added this (connectionInitSqls ="alter session set NLS_NUMERIC_CHARACTERS
= '.,'") into the context.xml file in the app. META-INF directory:


 <Resource auth="Container" driver="oracle.jdbc.OracleDriver"
factory="org.apache.tomcat.dbcp.dbcp2.cpdsadapter.DriverAdapterCPDS"
name="jdbc/ZDB_TESTCPDS"
type="org.apache.tomcat.dbcp.dbcp2.cpdsadapter.DriverAdapterCPDS"
url="jdbc:oracle:thin:@10.16.43.3:1521:ZDB001"/>
 <Resource auth="Container"
dataSourceName="java:/comp/env/jdbc/ZDB_TESTCPDS" defaultMaxActive="10"
defaultMaxIdle="5" defaultMaxWait="10000"
factory="org.apache.tomcat.dbcp.dbcp2.datasources.PerUserPoolDataSourceFactory"
logAbandoned="true" name="jdbc/ZDB_TEST" removeAbandoned="true"
removeAbandonedTimeout="300" testOnBorrow="false"
type="org.apache.tomcat.dbcp.dbcp2.datasources.PerUserPoolDataSource"
validationQuery="select 1 from AnyTable" *connectionInitSqls ="alter
session set NLS_NUMERIC_CHARACTERS = '.,'"*/>
 </Context>


But still not working.

Has somebody idea how to solve it?


thank you
Peter

Reply via email to