tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@gslweb.de
Subject Re: Servlet inter-communication
Date Wed, 03 May 2006 12:15:42 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.  

I think the standard way would be to use a a session bean,
if the communication is limited to a session, or an 
application bean if not. This is sort of shared memory, but
beware of concurrent access and synchronise. Both ways work 
only if the servlets are in the same webapp. I would refrain 
from using files in any case.

If the servlets are not in the same webapp, then IMHO
the only clean way is HTTP.

Georg

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


Mime
View raw message