This content has been marked as final.
Show 5 replies
-
1. Re: JTA EntityManager cannot access a transactions
konstantin.ermakov Dec 6, 2006 6:06 AM (in response to konstantin.ermakov)Sorry, the message is as following: JTA EntityManager cannot access a transactions
-
2. Re: JTA EntityManager cannot access a transactions
dkalna Dec 6, 2006 9:24 AM (in response to konstantin.ermakov)Hi, not sure but I think default is container managed tx, so you have to
explicit told your bean will take care of TXs, something like this:
@TransactionManagement(TransactionManagementType.BEAN)
public class YourBean implements YourInterface
Hope it helps.
bye
Dalibor -
3. Re: JTA EntityManager cannot access a transactions
konstantin.ermakov Dec 6, 2006 10:53 AM (in response to konstantin.ermakov)Hi!
This line exists before the Stateless Bean implementation.
Thanks,
Konstantin -
4. Re: JTA EntityManager cannot access a transactions
irajeev Sep 19, 2007 3:12 PM (in response to konstantin.ermakov)I am facing the same problem. Did you get the solution? Please let me know
-
5. Re: JTA EntityManager cannot access a transactions
oskar.carlstedt Sep 19, 2007 4:36 PM (in response to konstantin.ermakov)Hello!
I'm not sure , but if I look at your code you instantiate the em by yourself. Examples I've seen do not do that, they leave that part to JBoss, like the following code. Are you sure you get the correct entity manager?@Stateless @TransactionManagement(TransactionManagementType.BEAN) public class MySessionBean implements MyInterface { @Resource private EntityManager em; }
Kind regards
/Oskar