Since all your web apps are running on the same JVM, you can just use simple Java object to communicate with each other. Two questions should be considered. One is how to locate the common object by individual web apps. The simplest way is to just use a static object instance or singleton object. Make sure all accesses to the object are synchronized. The other way is to use a JNDI server. This may be difficult if you use Tomcat out of the box, but with an app server with a built-in JNDI (e.g. JBoss, WebLogic, SunOne), it should be very simple.
Another question is class loading. Since the object is going to be shared among all web apps, its class should defined in a jar file and stored under the common lib directory, instead of in WEB-INF under each individual webapp. ND -----Original Message----- From: JWM [mailto:[EMAIL PROTECTED] Sent: Monday, November 21, 2005 7:04 PM To: 'Tomcat Users List' Subject: Inter-webApp communication? I understand the architecture of webApps is that they are intended to be self-contained and not aware of other webApps in the system. However, I have two loosely-coupled webApps that periodically need to crosslink to each other. I have some relatively heavyweight objects that I would like to pass from one webApp to the other. Since the session objects are different for the two webApps, that let's that out. I know I could serialize the object and use the database, filesystem, or even pass it across as a form parameter. But that will be a performance nightmare and will require periodic cleaning after sessions go away. And it just seems like overkill to simply get an object passed within the same JVM. Combining the webApps into one is not an option either. First question is whether there is some architected way to pass a java object from one webApp to another (same user logged on via single signon). In lieu of that, is there some sort of "you really shouldn't do this, but if you must... here's how..."? Or am I stuck with db, filesystem, cookie, etc. approach? Thanks. --------------------------------------------------------------------- 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]