Leon Rosenberg wrote:
RMI, CORBA or (worst choice) SOAP.
Everything else, like using libs in shared/server folders etc are hacks :-)
Leon
On Wed, Oct 8, 2008 at 10:53 AM, Darryl Pentz <[EMAIL PROTECTED]> wrote:
I have an issue where webapp A needs to let webapp B know about an event, and
then return a response to webapp B's processing of that event to the browser.
So basically I need to communicate between webapps in the same container.
I have not found a no-brainer solution to this as yet. The one I have tried is
making a localhost HTTP call which I find to be rather expensive, given that it
requires creating a socket connection to the same container.
I also just encountered the 'crosscontext' attribute in the <context.../> block
and was wondering whether that could serve any purpose.
Does anybody know of any tried and trusted ways of communicating between
webapps in Tomcat?
Maybe hacks, but why not use them if they are easier, faster, and have a
smaller memory footprint ?
Not being very good at either Java or Tomcat, I'll submit the following
ideas, and watch for comments :
Depending on what exactly you need to pass as information, why not just
the fact of whether a given "flag" file exists in a directory under
catalina.base ? I know that this sounds quite pedestrian, but
considering that a webserver already makes zillions of file accesses
anyway, I don't think the overhead of a few more would matter.
Or, if both webapps already use some common database, a record in ditto
database. That is probably more flexible and more reliable re locking.
Or, a webapp with the appropriate permissions can set/reset/read a
system property, and these should be shared by all apps under the same
JVM instance, no ? what I don't know is if set/reset of a system
property is "atomic".
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]