Results 1 to 2 of 2

Thread: Cross Context communication without 'real remoting'

  1. #1
    Join Date
    Jul 2005
    Location
    Munich, Germany
    Posts
    153

    Default Cross Context communication without 'real remoting'

    Hello,

    does anyone know, how to do cross context communication without 'real remoting'?

    I have two separate .war files deployed in my tomcat, a 'backend.war' and a 'frontend.war'. The 'backend.war' currently exposes services via HTTP invoker and 'frontend.war' use those services. Now, I want to expose these services using a 'in-JVM-communication' for minimal overhead and maximum throughput. Is there a way to expose those services in that fasion? Maybe using JNDI?


    Best

    Oliver

  2. #2
    Join Date
    Mar 2005
    Location
    The Netherlands
    Posts
    121

    Default

    One alternative way of doing this without remoting would be to use a shared parent application context for both wars, where the backend war would define its services in this parent context of the regular WebApplicationContext created by the ContextLoader.
    The frontend war could then simply access the backend services as regular spring beans, while the backend war could still also publish its beans as remote services.
    See my blog entry for more detail on this setup (including the comments section on doing this in Tomcat). The services would need to be loaded by Tomcat's 'shared' classloader for this to work, so it would involve changing your current deployment plan, but it would avoid marshalling and unmarshalling on each method call.

    JNDI won't work, since the JNDI registry is read-only in Tomcat AFAIK.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •