Results 1 to 5 of 5

Thread: Two questions about RMI with Spring, monitor RMI / SSL

  1. #1

    Default 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. #2
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    Quote 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 .



    Quote 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.

  3. #3

    Default

    Hello Denis,

    Quote 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.

    Quote 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!

  4. #4
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    Quote 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.

  5. #5
    Join Date
    Feb 2009
    Location
    Raleigh NC
    Posts
    4

    Default 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

Posting Permissions

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