Announcement Announcement Module
Collapse
No announcement yet.
Automatic remoting of managed objects Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatic remoting of managed objects

    I've taken a brief look at the 1.1 docs, but don't see mention of it, so I'll try here! I'm using (currently) Spring 1.0.2, with some modifications. Essentially, the modification is an alternate RMI exporter, which allows for the automatic registration of objects in the container during method calls. Hmm, let me explain that better.

    Assuming you have object 'A' declared in the container (as a singleton), and 'A-rmi' declared as a remote object, and that A has a method getB() which returns a B - and finally that B is registered in the container as well...

    Then the default behavior on the client side when a.getB() is called (I assume that the client context is configured to reference the remote 'A-rmi' object) would be the standard pass by value semantics. The B will be serialialized back to the client by the server.

    The modification I've put in place simply examines the object being returned, and if it's registered in the container a proxy is inserted into the RMI server, and a stub is passed back to the client - thus the B object is auto-remoted, without you having to do anything (e.g: register the A as a remote object, and every 'managed' object that it might return is also 'remoted'). Clearly, it's important that the B object is also a singleton.

    I'm interested to know if the Spring team would find this useful? (e.g: should I submit a patch to 1.1?) - but also, have I missed something that already exists in the Spring f/w that would allow this kind of thing to happen, without having to write an alternative RMI exporter?


    Regards,
    Neil Clayton

  • #2
    I don't think we have something like that already. I somewhat resembles the AutoproxyCreatorse except this time it's an AutoExporter. I think it would be useful to have this included somehow.

    Could you post a patch to JIRA for the 1.2 release?

    Comment


    • #3
      Sure, I'll do that when I get back from holiday (3 weeks or so).

      Comment

      Working...
      X