velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Romianowski" <megap...@gmx.de>
Subject RE: questions on RunTime Singleton
Date Wed, 18 Dec 2002 16:26:09 GMT
  No there should be no problem in multiple JVMs / Servers.
Then you have a Singleton in each JVM. This works for me
really well. Your ApplicationServer / ServletEngine has
to take care of the shared sessions and stuff. No need to
worry about this in Velocity.

Peter

> -----Original Message-----
> From: Hanasaki JiJi [mailto:hanasaki@hanaden.com] 
> Sent: Wednesday, December 18, 2002 5:11 PM
> To: LIST - Jakarata Velocity
> Subject: Re: questions on RunTime Singleton
> 
> 
> I had thought there were issues with the same application running on 
> multiple servers using singletons becuase each server has its own JVM 
> yet a singleton can only exist in one JVM.
> ???
> 
> Geir Magnusson Jr. wrote:
> > 
> > On Wednesday, December 18, 2002, at 10:26 AM, Hanasaki JiJi wrote:
> > 
> >> Going through the Velocity API's and example code, there 
> are several
> >> references to RuntimeSingleton.
> >>
> >> Is this class an issue for clustered/loadBalanced servers running
> >> velocity applications?  If so, how how can the this be addressed?
> > 
> > 
> > ?
> > 
> > I don't understand the question.  If you are doing load 
> balancing, and
> > want to keep a users state in a session, then it doesn't 
> matter if you 
> > use the singlton or not - you have to take care of the problem with 
> > either a shared store for state info, or a balancer that 
> keeps sessions 
> > sticky.
> > 
> > The singleton just means that in a given JVM (or a webapp) 
> all users 
> > of
> > it share the same instance, and thus the same 
> configuration.  You may 
> > find this useful (to share cached templates) or not (if you want 
> > different configurations of the velocity engine at the same time...)
> > 
> 
> -- 
> =================================================================
> = Management is doing things right; leadership is doing the     =
> =       right things.    - Peter Drucker                        =
> =_______________________________________________________________=
> =     http://www.sun.com/service/sunps/jdc/javacenter.pdf       =
> =  www.sun.com | www.javasoft.com | 
> http://wwws.sun.com/sunone  = 
> =================================================================
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:velocity-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:velocity-user-help@jakarta.apache.org>
> 


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


Mime
View raw message