hi friends, I need to communicate(vice-versa) between two web-applications,(WAR)files, Is there any method to communicate between them.
Thanks Ganesh
Thanks,
Ganesh
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
posted
0
Where this two WAR were located ?? In the same server or in an intranet ? Please explain about the current system/software scenario to help you further...
Hi Balaji, Both the war files are located in the same server(Tomcat5 Or Oc4j 9g). I need to send/receive some parameters between the two applications. First War file - application is developed in MVC-2 framework, Second War file - application is developed in Struts1.2 framework.
Thanks in advance Ganesh.K
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
You can use any communication mechanism you can think of:
a database
a shared file
TCP or UDP
JMS
Email
a web service
HTTP
RMI
on Tomcat, you can even set the web apps so that you can get a RequestDispatcher in one web app for a resource in the other one
Hi Ulf, Thank you for your reply, indeed a lot of communication mechanism is available. Will JMS be suited for communication between Struts based application(since iam a newbie in JMS).
Thanks in advance, Ganesh.K
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
Which method is suitable depends largely on what your requirements are. Do you need one-way or two-way, synchronous or asynchronous, how fast does it need to be, do you have some of these technologies already available, ... Without knowing these it's impossible to even make an educated guess.
Ganesh Kannusamy
Ranch Hand
Joined: Sep 15, 2005
Posts: 35
posted
0
My requirements are, It is a two-way, asynchronous communication. It should be very fast. The technologies i already have are RMI, SOAP, HTTP.
From my requirements can you figure out which suits me best. Iam ready to implement JMS or TCP/UDP or any other best suited mechanism, but not Database
Thanks, Ganesh.K
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
For two-way asynchronous I'd recommend JMS. If speed if important, I'd prefer synchronous mechanisms, though. Since both sides are web apps, HTTP suggests itself for that - just send the request, and ignore the response.
Peer Reynders
Bartender
Joined: Aug 19, 2005
Posts: 2906
posted
0
I've never tried this before but I've wondered if it would be possible to "communicate" between two co-located web applications by using ServletContext.getContext(String uriPath) and RequestDispatchers (or even ServletContext listeners). Java Forums - ServletContext's getContext() method [ March 06, 2006: Message edited by: Peer Reynders ]