We are using Registry Direct JAVA APi for our web application which basically has to support
on an average 300-400 concurrent user connections. But we have observed some slowness in response
times as the system load increases.
My question is whether the approach through which we get a handle to the registry is correct or not?
We have a Singleton class that contains the single instance of LdapRegistry. We are using the following method
to get the LdapRegistry instance.
RgyRegistry = LdapRgyRegistryFactory.getInstance() ;
I was just wondering that in case of multithreaded web application, with this single instance of LdapRegistry
can we get good performance in our web app, espacially in cases where multiple threads try to reg the handle at the same time. Is it a good idea to pool a certain number of LdapRegistry instances using some object pool API such as one of those from APACHE.
Also, can this concurrent usage of registry API in a multithreaded web application lead to high CPU utilization?
Can you suggest the best practices related to number of LdapRegistry handles we should create?
Also if it is a best practice to create a singletom class and always keeps single instance of LDAPregistry for the entire application? Will this compromise performance?