Quantcast
Channel: Spring Community Forums - Data
Viewing all articles
Browse latest Browse all 297

connection-cache-properties and connection-properties in orcl:pooling-datasource

$
0
0
I have followed these instructions to set up my datasource connection pool.

http://static.springsource.org/sprin....failover.html

Everything works fine, but I have question about setting cache properties from environment variable. The requirement I have is to be able to create environment variable in tomcat to set connection and and cache properties.

For example, if I define these two environment variables in service.xml, does my connection pool cache is set up accordingly?

Code:

<Environment name="cache.MinLimit" type="cache.MinLimit" value="1"/>
<Environment name="cache.MaxLimit" type="cache.MaxLimit" value="20"/>

Here is my connection pool configuration in my spring app context file. Also, I do not have the cache.MinLimit and
cache.MaxLimit defined in orcl.properties and the orcl.properties is not packaged in my class path.

Code:

  <orcl:pooling-datasource id="racDataSource"
    url="${conn.url}" ONS-configuration="nodes=${conn.nodes}" username="${conn.username}"
    password="${conn.password}" connection-caching-enabled="true"  connection-properties-prefix="conn"
    connection-cache-properties-prefix="cache"
    fast-connection-failover-enabled="true" properties-location="classpath:orcl.properties">
  </orcl:pooling-datasource>

In advanced, thank you very much for your reply!

BR//Bahman

Viewing all articles
Browse latest Browse all 297

Trending Articles