Announcement Announcement Module
No announcement yet.
Retrieve WebApplicationContext on remote service (Http Invoker) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieve WebApplicationContext on remote service (Http Invoker)


    I use Spring 2.0.x and I have a question about Springís http Invoker. Itís possible to retrieve the WebApplicationContext on my remote service (p.e. AccountServiceImpl)?

    I know that I could use WebApplicationContextUtils.getRequiredWebApplicati onContext(ServletContext). But I donít know the way to retrieve the ServletContext on my remote service.

    To implement the interface ApplicationContextAware isínt a good option for me. Because a need a WebApplicationContext (not a ApplicationContext).

    Thanks in advance.

  • #2
    If the service is running in the applicationcontext the applicationcontext injected IS a webapplicationcontext. However I wonder why on earth do you want to tie your service layer to the web infrastructure, because that is what you are going to do.


    • #3
      Hi Marten.

      Thanks for your reply.

      Iíd like to transform a SOAP/Axis remote call to a Springís Http Invoker call. The reason is that we are experiencing performance troubles with SOAP/Axis overhead.

      The change should be (almost) transparent for the client application.

      It was so beautiful if I could expose remote service as is. But, unfortunately, the service is so coupled to Axis.

      So, I have to modify the service supplying some Axis functionality. For example, they use org.apache.axis.MessageContext to obtain the WebApplicationContext. And now, I have to retrieve the WebApplicationContext in a different way.

      Thanks for your question. Now, I should ask me, why are they interested WebApplicationContext? Perhaps I should go deeper on this.

      Best regards.


      • #4
        Sorry, I don't have enough knowledge about this matter. Please take help of some experienced person.