Configure Spring JNDI datasource with DBCP and connection parameters -


i using spring 3 , attempting use jndi (named) data source dbcp connection pooling.

i able set pool parameters, my

<bean id="datasource" class="org.springframework.jndi.jndiobjectfactorybean"> </bean> 

doesn't support necessary params:

<!-- connection pool settings --> <param name="maxactive" value="5" /> <param name="maxidle" value="2" /> <param name="maxwait" value="10000" /> <param name="removeabandoned" value="true" /> <param name="removeabandonedtimeout" value="60" /> <param name="logabandoned" value="true" />  <!-- purge invalid connections --> <param name="validationquery" value="select 1" /> <param name="testonborrow" value="true" /> 

i've googled extensively, , looks it's expected container (tomcat) should set these kinds of params jndi connections, not application.

unfortunately in situation (cloudbees) don't have control on tomcat.

is i'm attempting possible?

ok, i've figured out how this. reference, need use cloudbees sdk's bindings feature:

bees app:bind -a app_id -db db_id -as datasource_name maxactive=5 maxidle=2 \ maxwait=10000 removeabandoned=true removeabandonedtimeout=60 logabandoned=true \ validationquery="select 1" testonborrow=true 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -