tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Schnack <feli...@ritterdosreis.br>
Subject RE: servlets
Date Tue, 28 Jan 2003 21:18:52 GMT
  yes, I know how to do it (private constructor, etc), but how tomcat
will call an getInstance() method instead of create a new instance of
it?

On Tue, 2003-01-28 at 19:13, Shapira, Yoav wrote:
> Howdy,
> 
> >  If I write an servlet and DO NOT implement the SingleThreadModel, I
> >have a guarantee that I'll have only one instance of it?
> 
> No.
> 
> >If not, here is
> >a way to do this?
> 
> No.
> 
> If you need only one instance of something, put in in a singleton.  Have
> your servlets use the singleton.  A google search for "the singleton
> design pattern java" will yield many explanations and examples.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 
-- 

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@ritterdosreis.br
Fone/Fax.: (51)32303341


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message