[jboss-user] [JBoss Seam] - Re: Set non-shared Hibernate interceptor on JPA EntityManage
mjschehl
do-not-reply at jboss.com
Fri Oct 26 12:03:24 EDT 2007
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#4099388
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099388
More information about the jboss-user
mailing list