-
1. Re: Create stateless bean from stateful bean
jaikiran Dec 30, 2010 3:42 AM (in response to piotrekde)I'm not quite sure I completely understand the question.
piotrekde wrote:
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.
Yes, you get a proxy and then when a method is invoked on that proxy, typically an instance of a SLSB is picked up from pool and the method is invoked on that instance.
piotrekde wrote:
But what if I am on the same virtual machine?
You mean same JVM? I would say it doesn't make any difference, but I haven't yet understood the question, so I might be missing something.
piotrekde wrote:
Never instantiate EJBs (or any server managed components) via the constructor invocation. Doing so will strip off all the server provided services off those components (for example, the instances will no longer be having any transaction or security semantics).