The good news is that indeed, a joinTransaction() call does the job with @In injected entityManager.
anonymous wrote : Of course the @Injected EM will not join the transaction automatically because the transaction is started AFTER injection, when the method is called
i think i understand your remark: seam injection occurs just in front of each method invocation and the transasction is only started in the method!
however, @PersistenceContext injection occurs somewhere at bean creation and even earlier if i understand well.
so while I think I understand the seam behaviour now (joining makes sense), i'm still confused why i don't have to do a joinTransaction with @PersistenceContext injected entityManager (where does the join happen?) and why the behaviour should be different.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090276#4090276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090276
Thank you for the reply.
Would it be possible to post the configuration file (in which you specify the MBean configuration) ? I have to use JBossCache for a project at work and have been at it for a while now, without any success - the object is just never returned in the second method in the code above. This is getting critical. I have tried to configure and deploy it as an MBean and also tried running it as a standalone application (as part of a test), but I am just not having any luck.
Thank you for the help - it is much appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090272#4090272
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090272