Results 1 to 4 of 4

Thread: Webservices accessible from inside the same JVM

  1. #1
    Join Date
    Jun 2010
    Location
    Paris
    Posts
    106

    Question Webservices accessible from inside the same JVM

    Hello,

    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!

    Pierre

  2. #2
    Join Date
    Jun 2010
    Posts
    2

    Default

    It sounds like what you're looking for is the WSIF - http://en.wikipedia.org/wiki/Web_Ser...tion_Framework - 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 http://ws.apache.org/wsif

    M.

  3. #3
    Join Date
    Jun 2010
    Location
    Paris
    Posts
    106

    Default

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

  4. #4
    Join Date
    Mar 2006
    Location
    Germany, Karlsruhe
    Posts
    157

    Default

    Hi,
    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.

    Ingo

Tags for this Thread

Posting Permissions

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