cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <>
Subject Re: Are XSP Pages singletons?
Date Fri, 01 Sep 2000 23:27:23 GMT
Hey Ed, 

> Are XSP pages singletons, like Servlets?

Can you  explain why you think servlets are singletons?  

As I understand a singleton is an object that can only exist once per 
virtual machine ( e.g. JDBC's DriverManager, Apache's Turbine connection
pool DBMonitor, etc ).  Creating a singleton is not difficult ( I can 
send you some code ) or you could look at the the other two examples I 

Servlets are not singletons ( as I understand ).  If I connection to 
tomcat on your machine and request XXXServlet which you are already 
viewing AFAIK another instance of XXXServlet is created for me to use, 
thus it exists twice within a single VM making it is not a singleton.

> In other words, can class variables be used dynamically without fear of
> thread collision?

This needs explanation too.  How about an example?


View raw message