Hi all,
How is it possible to use Callback in EJB ? Of course I don't mean the callback methods in SessionSynchronization interface !
I need a way that the beans on server side can contact to the clients. Actually I need it to implement chat system by EJB (just for
testing). When a new message is arrived to system, it should be possible to send that message to other clients, too.
Should the client implement the Remote interface and pass its reference to server beans ?
Any idea ?
 
My second question is that how is it possible to share a dynamic data among beans ? I said 'dynamic data' because every bean
can change its content. I thought that maybe I can do it via JNDI. One of the beans binds that shared data and the others lookup
and use it ! but the problem is that the content can be changed !!
I think that JNDI keeps the object instances by serializing them (I'm not sure. so if I'm wrong, please correct me ). So if an object
is bound (and serialized) and another bean looks it up via JNDI and changes its content, will these changes be taken effect to the
bound (and serialized) object ?
I tested this case and it seemed that the changes are taken effect !!
Maybe I can solve this problem by setting the shared data as an entity bena but I don't want to have entity for this case.
I need to do it via JNDI.
Any suggestions ? Ideas ? comments ?
 
Thanks in Advance,
Armond
 

Reply via email to