RMI Login and Threads

Discussion in 'Java' started by HeidiWeber, Apr 15, 2007.

  1. HeidiWeber

    HeidiWeber Guest

    Hallo

    i´m new to RMI. I´ve made the RMI Tutorial from SUN. I have first 2
    questions:

    1)
    If more clients connect to the server. Becomes every client
    automaticaly his own thread thread? Or must i implement "thread
    programming"?

    2)
    I want to realise user autentification by ID and Password. Is there a
    "simple" solution for this problem - perhabs a tutorial? Or how can i
    do this? How can i ensure the methods, the whole server?

    Best regards
    cu
    Heidi
    HeidiWeber, Apr 15, 2007
    #1
    1. Advertising

  2. HeidiWeber

    Daniel Pitts Guest

    On Apr 15, 2:32 am, "HeidiWeber" <> wrote:
    > Hallo
    >
    > i´m new to RMI. I´ve made the RMI Tutorial from SUN. I have first 2
    > questions:
    >
    > 1)
    > If more clients connect to the server. Becomes every client
    > automaticaly his own thread thread? Or must i implement "thread
    > programming"?
    >
    > 2)
    > I want to realise user autentification by ID and Password. Is there a
    > "simple" solution for this problem - perhabs a tutorial? Or how can i
    > do this? How can i ensure the methods, the whole server?
    >
    > Best regards
    > cu
    > Heidi


    Hello Heidi, (That's my Wife's name too)
    With RMI, the threads are created and handled automatically for you,
    but you must be aware that your methods might be called by several
    threads, and handle them accordingly. I suggest reading "Java
    Concurrency in Practice" <http://www.javaconcurrencyinpractice.com/>
    to learn about the proper ways to handle this.

    For your second question, this is no "simple" answer... This is also a
    broad topic.
    First, you have to store the user id and password. Preferibly storing
    the password in a one-way-function encrypted form.
    Second, you *should* try to ensure that the password (in either its
    original or encrypted form) is never sent through clear-text. SSL is
    often the appropriate choice.
    Third, You have to keep track of authenticated sessions.

    I hope this helps,
    Daniel.
    Daniel Pitts, Apr 16, 2007
    #2
    1. Advertising

  3. HeidiWeber

    HeidiWeber Guest

    How to...

    "Daniel Pitts" <> schrieb im Newsbeitrag
    news:...
    On Apr 15, 2:32 am, "HeidiWeber" <> wrote:
    > Hallo
    >
    > i´m new to RMI. I´ve made the RMI Tutorial from SUN. I have first 2
    > questions:
    >
    > 1)
    > If more clients connect to the server. Becomes every client
    > automaticaly his own thread thread? Or must i implement "thread
    > programming"?
    >
    > 2)
    > I want to realise user autentification by ID and Password. Is there a
    > "simple" solution for this problem - perhabs a tutorial? Or how can i
    > do this? How can i ensure the methods, the whole server?
    >
    > Best regards
    > cu
    > Heidi


    Hello Heidi, (That's my Wife's name too)
    With RMI, the threads are created and handled automatically for you,
    but you must be aware that your methods might be called by several
    threads, and handle them accordingly. I suggest reading "Java
    Concurrency in Practice" <http://www.javaconcurrencyinpractice.com/>
    to learn about the proper ways to handle this.

    For your second question, this is no "simple" answer... This is also a
    broad topic.
    First, you have to store the user id and password. Preferibly storing
    the password in a one-way-function encrypted form.
    Second, you *should* try to ensure that the password (in either its
    original or encrypted form) is never sent through clear-text. SSL is
    often the appropriate choice.
    Third, You have to keep track of authenticated sessions.

    I hope this helps,
    Daniel.
    HeidiWeber, Apr 28, 2007
    #3
  4. HeidiWeber

    HeidiWeber Guest

    Hello Daniel,

    thank you very much for your help.

    But can you or someone else give me perhaps an example? Or a tutorial?
    Without the problematic with ssl. Thats the next big thema...

    Best regards
    cu
    HeidiWeber, Apr 28, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Rudolf

    Multiple threads with RMI

    Dave Rudolf, Nov 2, 2003, in forum: Java
    Replies:
    1
    Views:
    660
  2. Buu Nguyen

    RMI, JINI or RMI/IIOP

    Buu Nguyen, Aug 25, 2004, in forum: Java
    Replies:
    1
    Views:
    564
    Sudsy
    Aug 25, 2004
  3. JScoobyCed

    RMI Vs RMI over IIOP

    JScoobyCed, Jan 28, 2005, in forum: Java
    Replies:
    1
    Views:
    737
    Dag Sunde
    Jan 28, 2005
  4. Jan Schulze
    Replies:
    1
    Views:
    569
    Esmond Pitt
    Mar 26, 2005
  5. Reza
    Replies:
    6
    Views:
    5,599
Loading...

Share This Page