RMI - Pass data within clients

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rengaraj
    New Member
    • Jan 2007
    • 168

    #1

    RMI - Pass data within clients

    Dear Experts,

    I am new to RMI, On my application i having 2 clients and an server.

    Frist client gets data from User.
    Second client Process the data (which was received by first client)
    Result is displayed and First client only (Where input was received)

    Server is responsible for passing the input / output data only.

    Is it possible to be implemented using RMI ??
    Advance Thanks,
    Rengaraj.R
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by rengaraj
    Dear Experts,

    I am new to RMI, On my application i having 2 clients and an server.

    Frist client gets data from User.
    Second client Process the data (which was received by first client)
    Result is displayed and First client only (Where input was received)

    Server is responsible for passing the input / output data only.

    Is it possible to be implemented using RMI ??
    Advance Thanks,
    Rengaraj.R
    Sure, if you can do it in one JVM (all classes in that JVM) you can do it
    using RMI and multiple JVMs; just make sure that the data you pass from
    class to class implements the Serializable interface.

    kind regards,

    Jos

    Comment

    • rengaraj
      New Member
      • Jan 2007
      • 168

      #3
      Originally posted by JosAH
      Sure, if you can do it in one JVM (all classes in that JVM) you can do it
      using RMI and multiple JVMs; just make sure that the data you pass from
      class to class implements the Serializable interface.

      kind regards,

      Jos
      Thanks Jos,
      I haven't tested even on one JVM. I hope my implementing serializable interface we can pass data from one client window to another client window.

      If you have any example please give me.
      Advance Thanks
      Rengaraj.R

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by rengaraj
        Thanks Jos,
        I haven't tested even on one JVM. I hope my implementing serializable interface we can pass data from one client window to another client window.

        If you have any example please give me.
        Advance Thanks
        Rengaraj.R
        Implementing the Serializable interface is easy: it's a "marker" interface so there's
        nothing to implement. Read Sun's RMI Tutorial and do the exercise and see how
        it all works: the rmic compiler generates stub classes for you and your client
        side simply talks to the stub(s). The server side registers itself at a naming
        service and that's it. Your actual code stays the same and there you've got your
        RMI communication.

        kind regards,

        Jos

        Comment

        Working...