Toby Weston wrote: > > I have implemented an EJB state machine for monitoring business processes.. and need >to send events to listeners (over RMI). > > I would like to use a stateless session bean as the event dispatcher but am not sure >where to persist the list of listeners in the session bean?
The problem is that you simply can't do this. A session bean, stateless or not, will not be represented by a single instance on the server. It is possible (probable!) that you will have multiple instance representing that bean. The result is that each bean will contain only a partial list of the listener instances. There are two ways you could make something like this work. Firstly the underlying database keeps a list of IP/ports for each client and you do it manually or play with JMS and have the source of the queue on the server and the every client as listeners. -- Justin Couch http://www.vlc.com.au/~justin/ Freelance Java Consultant http://www.yumetech.com/ Author, Java 3D FAQ Maintainer http://www.j3d.org/ ------------------------------------------------------------------- "Humanism is dead. Animals think, feel; so do machines now. Neither man nor woman is the measure of all things. Every organism processes data according to its domain, its environment; you, with all your brains, would be useless in a mouse's universe..." - Greg Bear, Slant ------------------------------------------------------------------- =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
