Just get the connection pool object by calling the getInstance method.
You can call it from your bean (preferred method) or directly in your
JSP page. Just make sure that the "ConnectionPool" object is in the
CLASSPATH.
This should be unique unless there's some weird
classloading stuff going on ...
public class ConnectionPool
{
ConnectionPool instance;
public static ConnectionPool getInstance()
{
if (instance == null)
{
synchronized (ConnectionPool.class)
{
if (instance == null)
{
instance = new ConnectionPool();
}
}
}
return instance;
}
}
Cory L Hubert <[EMAIL PROTECTED]> wrote:
>
> I am using JRUN and JSP 1.0. I want to use a ConnectionPool class that I
>have created. It uses the Singleton Design Pattern. How can I make it so
>that I only have one instance of this class and all the JSP pages & Beans
>use that one instance.
>
>===========================================================================
>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
----------
Message To Spammers -- Game Over! Get spam-free email at http://www.MsgTo.com
===========================================================================
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