zikou
Sep 24th, 2007, 12:02 PM
Hi,
following my goal:
- My application should connect to an LDAP (using ldaptemplate), retreive data and then close connection. The retrieved data will reside in an ehcache instance.
Every Hour, the cache expire and my application will reconnect to the LDAP to retrieve the fresh datas.
I'm using the following configuration to feat to my need, I'm using a pool with 1 connection that expire after 10s of inactivity.
-Dcom.sun.jndi.ldap.connect.timeout=10000
-Dcom.sun.jndi.ldap.connect.pool=true
-Dcom.sun.jndi.ldap.connect.pool.maxsize=1
I thought that my config will ensure that the maximum number of connections will be 1. this was not the case.
Could you please tell me what's wrong with my approach and if there is another one to feet my objective ?
following my goal:
- My application should connect to an LDAP (using ldaptemplate), retreive data and then close connection. The retrieved data will reside in an ehcache instance.
Every Hour, the cache expire and my application will reconnect to the LDAP to retrieve the fresh datas.
I'm using the following configuration to feat to my need, I'm using a pool with 1 connection that expire after 10s of inactivity.
-Dcom.sun.jndi.ldap.connect.timeout=10000
-Dcom.sun.jndi.ldap.connect.pool=true
-Dcom.sun.jndi.ldap.connect.pool.maxsize=1
I thought that my config will ensure that the maximum number of connections will be 1. this was not the case.
Could you please tell me what's wrong with my approach and if there is another one to feet my objective ?