Tomcat JNDI Oracle 19c with TLS v1.2
SSL Connection to Oracle DB using JDBC, TLSv1.2, JKS or Oracle Wallets (12.2 and lower)
https://www.796t.com/p/316899.html
https://www.ibm.com/docs/en/tnpm/1.4.2?topic=security-import-certificate-jre-keystore
需要 jdk/jre/lib/secrity/cacerts
tomcat 啟動參數
-Doracle.net.wallet_location=D:\app\oracle\wallet -Doracle.net.ssl.clipher_suites="(TLS_RSA_WITH_AES_256_CBC_SHA256)" -Djavax.net.debug=all
context.xml 連線設定
<Resource auth="Container" name="jdbc/myDS" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" username="MyUserName" password="MyPassWord" maxIdle="2" maxWaitMillis="5000" url="jdbc:oracle:thin:@192.168.0.100:1521:MYDB" maxTotal="4" /> <Resource auth="Container" name="jdbc/myDS" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" username="MyUserName" password="MyPassWord" maxIdle="1" maxWaitMillis="5000" url="jdbc:oracle:thin:@(DESCRIPTION= (ADDRESS=(PROTOCOL=TCPS)(HOST=192.168.0.100)(PORT=1522)) (CONNECT_DATA= (SERVER = DEDICATED) (SERVICE_NAME=MYDB) ) )" maxTotal="1" />