V
Vjeran Marcinko
Hi folks.
I'm really fresh in EJB stuff, so at first I thought it was just another heavyweight framework, but more I think about it it seems that it is not suitable for every kind of application ...but moew like for stateless (due to nature of HTTP protocol) kind of web apps.
Anyway, is it possible to create something like singleton EJB ? I don't need referencing it through static accessor SingletonClass.getInstance(), I would fetch it from JNDI context, but I need just one instance of it to exist in EJB container ...
More concretly - let's say I want to make some 'ChatRoom' EJB, which would hold references of all connected clients, so it could dispatch messages to all room chatters when some message is placed into chat room ? Is EJB not meant to be used for this kind of applications ?
Regards,
Vjeran
I'm really fresh in EJB stuff, so at first I thought it was just another heavyweight framework, but more I think about it it seems that it is not suitable for every kind of application ...but moew like for stateless (due to nature of HTTP protocol) kind of web apps.
Anyway, is it possible to create something like singleton EJB ? I don't need referencing it through static accessor SingletonClass.getInstance(), I would fetch it from JNDI context, but I need just one instance of it to exist in EJB container ...
More concretly - let's say I want to make some 'ChatRoom' EJB, which would hold references of all connected clients, so it could dispatch messages to all room chatters when some message is placed into chat room ? Is EJB not meant to be used for this kind of applications ?
Regards,
Vjeran