I am using wildfly 8.2 and oracle 11g, and I have my connection pool clearing an invalid connection and creating a new one if possible. I use Spring and Hibernate on the back-end too (we view the connection through JNDI)
I could not find a brief example of the pool configuration for oracle on the network with which I could work, so I broke bits and beans from different sources and was able to make them work.
My question is that. I set Validate On Match to true, but the Jboss document ( https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/beta500/html/ch13s13.html ) indicates that
<validate-on-match> - Prior to JBoss 4.0.5, connection validation occurred when the JCA layer attempted to match a managed connection. With the addition of <background-validation> this is no longer required. Specifying <validate-on-match> forces the old behavior. NOTE: this is typically NOT used in conjunction with <background-validation>
Run codeHide resultI would not want to use the "old behavior" if I can avoid it. Does anyone have an example of automatically recovering connection pools from Oracle 11g Wildfly 8.2. and using the ojdbc6 driver.
thank
By the way, my current setting for the pool is given below (nb I know that my pool size is set to 1, it was so that I could easily kill the session and find out how the pool is restored).
<datasource jta="true" jndi-name="java:/jboss/datasources/mydatabase" pool-name="mydatabase" enabled="true" use-ccm="true">
<connection-url>jdbc:oracle:thin:@localhost:1521:mydatabase</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<driver>ojdbc6-11.1.0.7.0.jar</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>1</max-pool-size>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>mydatabase</user-name>
<password>mydatabase</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1 FROM DUAL</check-valid-connection-sql>
<validate-on-match>true</validate-on-match>
<background-validation>false</background-validation>
</validation>
<timeout>
<set-tx-query-timeout>false</set-tx-query-timeout>
<blocking-timeout-millis>0</blocking-timeout-millis>
<idle-timeout-minutes>0</idle-timeout-minutes>
<query-timeout>0</query-timeout>
<use-try-lock>0</use-try-lock>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
</datasources>
Run codeHide resultGreet anyone who can help
source
share