Announcement Announcement Module
Collapse
No announcement yet.
Two questions about RMI with Spring, monitor RMI / SSL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Two questions about RMI with Spring, monitor RMI / SSL

    Hello,

    I'm fairly new to Spring remoting, I would like to use RMI to call some remote methods and transfer simple XML Strings. Now I have two questions, I hope you can help me on this:

    1. Is it possible to use SSL with Spring RMI?
    2. Can I monitor the state of a remote method call, let's say to see the progress of the data transfer?

    If these questions have nothing to do with Spring but with RMI itself, I'm sorry and please say so


    Thanks a lot for your help

  • #2
    Originally posted by patb View Post
    1. Is it possible to use SSL with Spring RMI?
    Yes, it's possible. You have to configure RMI stuff with necessary RMI socket factories. Check the following spring rmi exporter properties - RmiServiceExporter.clientSocketFactory and RmiServiceExporter.serverSocketFactory. Also you may find useful the following RMI guide chapter - Using Custom Socket Factories with JavaTM RMI .



    Originally posted by patb View Post
    2. Can I monitor the state of a remote method call, let's say to see the progress of the data transfer?
    It's not possible to provide such functionality out-of-the-box. RMI layer doesn't know anything about your domain-level processing. You can implement such progress notification only by hand.

    Comment


    • #3
      Hello Denis,

      Originally posted by denis.zhdanov View Post
      Yes, it's possible. You have to configure RMI stuff with necessary RMI socket factories. Check the following spring rmi exporter properties - RmiServiceExporter.clientSocketFactory and RmiServiceExporter.serverSocketFactory. Also you may find useful the following RMI guide chapter - Using Custom Socket Factories with JavaTM RMI .
      thanks a lot for your help. These properties are exactly what I was looking for. So I found the class "SslRMIClientSocketFactory", which I must use.

      Originally posted by denis.zhdanov View Post
      It's not possible to provide such functionality out-of-the-box. RMI layer doesn't know anything about your domain-level processing. You can implement such progress notification only by hand.
      May give me a hint where to start looking for information on that? I neither can imagine how to to such a progress notification by hand, nor do I find something useful via google :-/


      Thank you so much!

      Comment


      • #4
        Originally posted by patb View Post

        May give me a hint where to start looking for information on that? I neither can imagine how to to such a progress notification by hand, nor do I find something useful via google :-/

        Thank you so much!
        You just need to be able to get a client callback at the server side. I.e. the server should be able to notify the client within the new task progress state. Callback may be implemented using various underlying infrastructure. E.g. you can register RMI-based client callback at the RMI registry and make server to use it. You can use any other communication, e.g. jms, http, plain sockets etc.

        Comment


        • #5
          What else is need to support RMI over SSL?

          [QUOTE=denis.zhdanov;205031]Yes, it's possible. You have to configure RMI stuff with necessary RMI socket factories. Check the following spring rmi exporter properties - RmiServiceExporter.clientSocketFactory and RmiServiceExporter.serverSocketFactory. Also you may find useful the following RMI guide chapter - Using Custom Socket Factories with JavaTM RMI .

          What RMI stuff are you talking about? I know there are the RmiServiceExporter properties: serverSocketFactory, registryServerSockeFactory, clientSocketFactory and registryClientSocketFactory. There is also a property for RmiProxyFactoryBean: registryClientSocketFactory. I've set them to the appropriate SSL client or server socket factory. Are there others? I'm searching but unable to uncover something else I need to support RMI over SSL.

          I'm getting on the server at javax.net.ssl.SSLHandshakeException: no cipher suites in common when the client connects and javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure on the client.

          Any help or suggestions will be.. helpful. Thanks,
          Bill

          Comment

          Working...
          X