Announcement Announcement Module
No announcement yet.
Cross Context communication without 'real remoting' Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cross Context communication without 'real remoting'


    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?



  • #2
    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.