Results 1 to 8 of 8

Thread: Spring and RMI ?

  1. #1
    Join Date
    Jan 2005
    Posts
    5

    Default Spring and RMI ?

    Hello,

    I need to access to my objects deployed into the String using RMI, in the same way I do it with entity EJB bean. How can I do this ?

    Thanks !

    Best regards,
    Toine

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Check out section 16.2 of the reference guide for details on exposing services via RMI.

    Rob

  3. #3
    Join Date
    Jan 2005
    Posts
    5

    Default

    Thanks for the reply. I already read this chapter but I think this one is more about exposing service like we can do using EJB Stateless Session Bean ?

    What I'd like to do, is to expose bean, like we can do it using EJB Entity and its remote interface.

    Can you tell me more about this feature using Spring ?

    Regards,
    Toine

  4. #4
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Toine,

    What are you trying to accomplish? Do you want to expose your domain objects/persisten objects remotely? If so, Spring doesn't provide any direct support for this and in my experience acessing persistent objects using a remote interface is generally a precursor to some bad performance problems.

    Rob

  5. #5
    Join Date
    Jan 2005
    Posts
    5

    Default

    Rob,

    Yes, that's exactely what I tried to do because of the current architecture of an application... I know well that using remotely directly domain objects will give bad performance results... But I haven't the choice anymore ...

    So, maybe have you some pieces of answer concerning my initial problem : an application must access domain object in two modes, but it must know how this domain objects are implemented : localy (POJO) ou remotely (technology still undefined : first idea was Entity EJB before reading the book "Java Faster and Lighter", and interrest about the work of the Spring Team)

    Application uses domain objects using Factory and Interface to abstract their implementations.

    Have you any experience about this kind of architecture ?

    Best regards,
    Toine

  6. #6
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Toine,

    I've worked with an architecture similar to this in the past, but not using Spring. When I need for domain objects to be accessed from remote components I find it better to make them serializable and then send them over the wire using a remote service.

    Rob

  7. #7
    Join Date
    Jan 2005
    Posts
    5

    Default

    Rob,

    So, in fact when clients received the domain objects you sent using a service, they must modfied the "copy" of these domain objects, and afterwards, re-sent the domain objects modified to the server using a service too ?

    Regards,
    Toine

  8. #8
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Toine,

    Essentially yes. This prevents there being a large number of small network calls instead you get a smaller number of larger calls which overall is much more efficient.

    Rob

Posting Permissions

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