Title: Singleton Class -RE: [Fwd: using ResultSet with JSP?]

You can use static methods and variables. Singleton pattern is over-kill - In the true OO world a class has multiple instances because they have seperate behavior and data. If there is only one instance, then it's probably class behavior that you have. Sine Java is not true OO and doesn't really support extending class behavior - the static methods and behavior come closest to class behavior.

Sachin.

p.s - there are ways to make sure your class is not garbage collected - you can use - noclassgc option

> -----Original Message-----
> From: Cory L Hubert [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 07, 1999 2:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Fwd: using ResultSet with JSP?]
>
>
>         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
>

Reply via email to