"jaikiran" wrote : anonymous wrote : Whether I do the JNDI lookup multiple times
right after each other in the same method, or test what the JNDI lookup returns in
multiple simultaneous requests, the result is always an object instance with the same ID
(e.g. org.jboss.jpa.tx.TransactionScopedEntityManager@d78f1b).
|
| Hmm, i would have expected it to return different instances in the multiple
simultaneous requests usecase.
|
Me too. What I more precisely did was the following simple test:
1) Put the simple above shown code in a ServletFilter I happened to have on my screen that
requested the EM out of JNDI.
2) Added a break-point to it, requested a page being filtered, inspected the identity of
the instance using the Eclipse debugger.
3) While the request thread was still being suspended, I did a new request (for the same
page) in a second tab of the same browser.
4) Observed the break-point was being hit again, but now in another thread and confirmed
that the identity of the instance was the same one as was returned for the currently
suspended thread.
If there is anything else you'd like me to test, please let me know.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250133#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...