Stateful Bean ID

Discussions

EJB programming & troubleshooting: Stateful Bean ID

  1. Stateful Bean ID (3 messages)

    Hello!

    I'm using WebLogic server and have a Stateful Bean running. In the WebLogic Console, each instance of the Stateful Beans is assigned a unique ID which has the format: 999999_9

    Does anyone know how to retrieve this unique ID?

    Thanks,

    /Eje

    Threaded Messages (3)

  2. Stateful Bean ID[ Go to top ]

    Sorry for asking instead of answering - why would you need it?
  3. Stateful Bean ID[ Go to top ]

    Hi and thanks for your question and answer :)

    I need it because I'm using a Stateful Bean as a Session Manager, where each Bean stores attributes for a client. I store the "Session ID" in a central repository, because even other applications need to access the session. I need to be sure that the Session Id created is a uniqe one, and was therefore interested in the WLS Console ID mechanism which is sure to give each EJB a uniqe key.

    I'm not sure if this is the right way to do it, but we cannot use Servlet Session ID's because some of the clients are WAP terminals.

    /Eje
  4. Stateful Bean ID[ Go to top ]

    It is System.identityHashCode(this) - if you are inside the XXXBean.java