Indeed. If it is within the same context this is trivial - look into
singleton design pattern. If the servlets are from different contexts
you will have to enable crosscontext in your server.xml I assume.

In any case be aware of race conditions/dead locks - Java5.0 has new
semaphore types which might help you.

Regards Thomas

-----Original Message-----
From: Samuli Elomaa [mailto:[EMAIL PROTECTED] 
Sent: 3. maj 2006 09:57
To: Tomcat Users List
Subject: Servlet inter-communication

Hi,
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?

Samuli

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to