J
john_hilgedick
All,
I've got a pretty straight forward question that I haven't been able to
find the answer to with regards to stateless session beans and
creation. My question is, once a clientA invokes a method on a bean
instance X, can another clientB invoke a method on bean instance X
before clientA finishes?
I've been assuming that this is possible - that's it's really up to the
application server (jboss, jrun, weblogic, etc) to determine this for
themselves. Because of this assumption, I've been very wary about
storing things like database connections inside my stateless session
bean's instance variables. I'd hate to have clientA come along, grab
access to bean instance X, create a connection and store it in bean
instance X and then, before clientA is finished with the bean, clientB
comes along, notices that connection that clientA stored inside the
bean instance, and uses it. You could see how this could cause I
problem.
Am I being too cautious? Is it really possible for 2 or more clients
to be accessing the same bean instance at the same time?
Any light you can shed would be appreciated.
Thanks,
-john
I've got a pretty straight forward question that I haven't been able to
find the answer to with regards to stateless session beans and
creation. My question is, once a clientA invokes a method on a bean
instance X, can another clientB invoke a method on bean instance X
before clientA finishes?
I've been assuming that this is possible - that's it's really up to the
application server (jboss, jrun, weblogic, etc) to determine this for
themselves. Because of this assumption, I've been very wary about
storing things like database connections inside my stateless session
bean's instance variables. I'd hate to have clientA come along, grab
access to bean instance X, create a connection and store it in bean
instance X and then, before clientA is finished with the bean, clientB
comes along, notices that connection that clientA stored inside the
bean instance, and uses it. You could see how this could cause I
problem.
Am I being too cautious? Is it really possible for 2 or more clients
to be accessing the same bean instance at the same time?
Any light you can shed would be appreciated.
Thanks,
-john