Don't forget to add mutex locking around your connection pool object,
otherwise you will have a race condition and end up with multiple instances
of the connection pool.
> class SingletonConnectionPool {
> private static SingletonConnectionPool m_conPool = null;
private static Object _mutex = new Object(); // JWA
>
> public static getInstance() {
synchronized(_mutex) { // JWA
> if (m_conPool == null)
> m_conPool = new SingletonConnectionPool();
>
} // JWA
> return m_conPool();
> }
>
> private SingletonConnectionPool(...);
> }
==================================
Jacob W Anderson
Software Design & Management Consultant
Arrowhead General Insurance Group
[EMAIL PROTECTED]
(858) 361 2384
=================================
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html