I believe my thread-safe code is not okay because I want to create and save new entities
inside of it.
To do that safely, I would need to create a new temporary EntityManager using the same
JDBC connection and transaction.
How can I do that? Other than that, is the code safe and okay to do?
public class MyInterceptor extends EmptyInterceptor {
|
| @In Identity identity;
|
| @PersistenceContext
| private EntityManager em;
|
| ...
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099388#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...