For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > April 2006 > Spring - Multiple Application Contexts?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Spring - Multiple Application Contexts?
JC

2006-04-27, 4:01 am

Hi all,

Not 100% sure if this is the right forum to post this question, but here
goes:

I have an application that is made up of two seperate top level
components, the first being the actual business logic (essentially a
scheduling engine) and then the second being a web-app that is used to
provide an administrative UI to the first.

Within the first component, I define a Spring application context, which
contains, amongst other things a bean which fires up an instance of
Jetty and then loads the web-app into it, so that the application
basically has an internal web-server. The web-app itself has it's own
application context (based on its lead servlet) and I need to have
communication through from the web-app to the main component.

At the moment, I'm using RMI (within the same JVM) to do this - but
ideally, I'd want the web-application to obtain a reference to, and then
use beans defined within the application context for the first
component. The RMI just complicates the plumbing at the moment, and I'm
thinking that it would be far more efficient to just make calls directly
through to the beans defined within the first component.

Does anyone know if it's possible to obtain a reference to all
application contexts defined within the same JVM?

Hope this makes sense...


JC
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com