-
Jul 30th, 2009, 02:10 AM
#1
How to connect to applications with SI in the same VM
Hi,
i have two web-applications which resides in the same vm. Both starts their own application context. How can i connet the two applications via spring integration, what possibilites exists to connect to a channel in another application context in the same vm?
-
Jul 30th, 2009, 10:24 AM
#2
Well. . . interesting question and yes you can do it
You need to enable shared (global) application context where you would define channels. This context would become parent for both web applications and then you can use the channel to exchange messages between the two.
Here is the link to a nice blog describing how to enable parent (global) application context.
http://internna.blogspot.com/2007/05...plication.html
Also, if you (by any chance) running your web app in the OSGi environment, then each application context is exported as an OSGi service by the DM extender bundle which means you can access any application context as any other OSGi service.
-
Jul 31st, 2009, 10:50 AM
#3
I don't know if this would violate your design concerns (and I haven't tried it) but I am pretty sure that a static singleton channel (exposed in both contexts using a factory) would do the trick already.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules