Results 1 to 4 of 4

Thread: Retrieve WebApplicationContext on remote service (Http Invoker)

  1. #1
    Join Date
    Dec 2009
    Posts
    11

    Default Retrieve WebApplicationContext on remote service (Http Invoker)

    Hi.

    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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Dec 2009
    Posts
    11

    Default

    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. #4

    Default

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

Posting Permissions

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