Announcement Announcement Module
No announcement yet.
Webservices accessible from inside the same JVM Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Webservices accessible from inside the same JVM


    I need to expose services for internal and external clients.

    For the external clients, I intend to use Spring-WS to expose the services.
    But for the internal clients (a different EAR from the same JVM), going through a marshalling and unmarshalling process would be too slow for my purposes.

    As the client and the server are running on the same JVM, I thought of simply calling directly the service, but the client is actually on a different EAR, which means a different ClassLoader. Thus, the singleton of my exposed service would actually be re-instantiated on the client side, which is not desirable (this would similar to instantiating a server class on client side!!)

    After a few investigations, I found out that what I'm looking for is very close to the EJB-local : Remote service without the serialization part.

    Is there something similar for the Webservices in Spring-WS (remote service through JAXB2 objects without the marshall/unmarshall part) ?
    I believe it makes sense as I've already heard of such a feature in OpenESB (the messages are not marshalled/unmarshalled if the client calls a service exposed on the same bus).

    If not, is it conceivable? And besides EJB-local, has somebody an idea about what my options are with Spring for my needs?

    Thank you!


  • #2
    It sounds like what you're looking for is the WSIF - - which allows you to use different WSDL bindings for your services at runtime. Remote services can be invoked using SOAP and locally as EJBs. Oracle uses this extensively in their SOA Suite. The Apache version is at



    • #3
      Thank you. The idea is interesting, but too intrusive. I hoped Spring had such a solution with only configuration files.


      • #4
        I also investigated this 3 years ago and I only found hacks. I think there isn't an fine way to do it.

        We worked around this problem by using OSGi. Our server services are available through an interface and we have different bundles for remote and local access.
        But this solution may be too complex and costly for you.