how to communicate between two WAR-files without EAR?
1 posts in topic
Flat View  Flat View

Posted By:   Aleksey_Skorokhodov
Posted On:   Friday, December 26, 2003 02:40 AM

as I know, Tomcat does not support EAR modules.
so, how can I communicate between two WAR-files ?

I need to have something like 'gate', when java code from one WAR sends a message and a class from second WAR receives this message.
I can create additional JAR file to store such 'gate', but afaik different WAR-files will have their own instances of such 'gate', which is not acceptable - they will not communicate.

so, how to communicate in this situation (without using a database) ?

Re: how to communicate between two WAR-files without EAR?

Posted By:   AlessandroA_Garbagnati  
Posted On:   Monday, December 29, 2003 12:39 AM


If you don't want to use a database, the best way is to have a third web application that acts as a gate. This would be portable and you can design the third web application for your needs.

Tomcat allows you to communicate directly between two web application if you set the crossContext attribute to true inside the tag of your web appication. As specified by the documentation (Server Configuration Reference - The Context Container) "ServletContext.getContext() will successfully return a request dispatcher for other web applications running on this virtual host".

About | Sitemap | Contact