Entity Bean Listener / List of logged users


EJB programming & troubleshooting: Entity Bean Listener / List of logged users

  1. Entity Bean Listener / List of logged users (1 messages)

    Hi I would like to implement this mechanism in EJB container:
    1. client (Swing application) can request initial set of objects from server, after that this client should be automatically notified when these objects are changing or when new objects are created or deleted (preferebly by RMI callbacks from server to client)
    2. is there a way how to get list of all instances of session bean of one type - I would like to list all users that are now logged to my application

    Many thanks for any hints.

    Threaded Messages (1)

  2. Not really[ Go to top ]

    There is nothing out of the box to support this, but I have done something like this with JMS.

    Have a JMS topic/queue that your clients listen to, and have them listen to the queue the first time they connect. Listening to a JMS topic/queue is exceptionally easy with the client side Message Bean listener interface (can't remember what it is called). When the server posts a change event to the queue, the client side message listener will be called.

    Hope this helps.