tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Crowther" <Peter.Crowt...@melandra.com>
Subject RE: Servlet inter-communication
Date Wed, 03 May 2006 08:47:36 GMT
> From: Samuli Elomaa [mailto:samuli.elomaa@pp.inet.fi] 
> Is there any otherway for two servlets in same tomcat to communicate  
> together except by http requests? Eg. could two servlets use 
> somekind of shared memory? or send signals to each other?

Both could in theory rendezvous at a common filename.  However, it may
be easier to put a singleton class in shared/lib.  It will then be
loaded by the shared classloader, so both webapps would see the same
class.  As always, beware singletons when unloading - however, as this
is a shared class, there should only ever be one of it in the system
anyway.

		- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message