Results 1 to 3 of 3

Thread: How to connect to applications with SI in the same VM

  1. #1
    Join Date
    Jun 2006
    Posts
    2

    Default 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?

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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.

  3. #3
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    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
  •