-
Dec 17th, 2009, 06:46 AM
#1
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.
-
Dec 17th, 2009, 08:37 AM
#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.
-
Dec 17th, 2009, 09:27 AM
#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.
-
Dec 25th, 2009, 06:56 AM
#4
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
-
Forum Rules