No. A web application has its own scope; each session's classpath is linked
to that web application. Thus, if you have a singleton class in a web
application's classpath (in any given classloader instance) the singleton
will be localised to that web application.


>What do you mean with 'local scope'? There are multiple clients that share
>simultaneously the same application, which is execute on one web-server.
>If we use Java applications as clients, every user gets his own local
>singleton-instance, that manage user-specific settings. In connection with
>JSP
>there would be instanciated one instance per web-server, that is shared by
>multiple
>sessions (users), isnt't it?
>
>Joseph Ottinger wrote:
>
> > >I want to use the singleton-pattern in my application but when
>JSP-pages
> > >serve as clients, every session should use it's own instance of the
> > >singleton. How can I manage?
> >
> > Put the singleton in local scope for the application.
> >
> > >It is possible (how?) to start a new JVM for every new session? - I'm
> > >using the Borland Application Server with Tomcat.
> >
> > YIKES! I shudder to even THINK about this...
> >
> > You don't need to, you don't want to, unless Tomcat's far more broken
>than I
> > thought. Classes are local to each application; if your singleton is
>located
> > in WEB-INF/classes, for example, they exist only for that application
> > (although CLASSPATH rules still apply.)
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >
>===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>--
>Yvonne Meinken
>Werum DV-Systeme GmbH
>Erbstorfer Landstr. 12
>D-21337 L�neburg
>Tel.: +49 4131 8900-25
>Fax: +49 4131 8900-20
>mailto:[EMAIL PROTECTED]
>http:\\www.werum.de
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to