piotrekde [
http://community.jboss.org/people/piotrekde] created the discussion
"Create stateless bean from stateful bean"
To view the discussion, visit:
http://community.jboss.org/message/577951#577951
--------------------------------------------------------------
Hi,
It is a simple question (however I'm not sure about the answer). In my application
there is a stateful bean which works as a "work dispatcher" service - it
receives events (on some scheduled time) and invokes stateless beans method passing
appropriate arguments - those stateless beans do the whole job. My question is: how to
obtain references to stateless beans (workers) in work dispatcher (executive) in a way
that guarantee that stateless beans will be pooled (their state and number are managed by
server, it is not just a single instance)?
I know, that if I obtain a reference by JNDI to the bean, then I've got proxy object,
but behind it, actually might be 10 stateless beans doing its work.
But what if I am on the same virtual machine? Should I use @EJB annotation or maybe
ordinary constructor?
Thanks in advance,
Piotr
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/577951#577951]
Start a new discussion in Beginner's Corner at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]