This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes Could not enlist in transaction on entering meta-aware object! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Could not enlist in transaction on entering meta-aware object!" Watch "Could not enlist in transaction on entering meta-aware object!" New topic
Author

Could not enlist in transaction on entering meta-aware object!

Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
Hello everyone,

I have a transaction which spans 2 session beans and each of these session beans interact with a different EntityManager. Also, these EntityManagers interact with different data sources.

The problem is, when I try to call o method on the second EntityManager, I get this "Could not enlist in transaction on entering meta-aware object!" exception.

I've read somewhere that if I invoke another sessionbean from a session bean (which is my case), I should use the same PersistenceContext in both EJBs. But I can't do this, since my PersistenceContexts point to different data sources.

Is there a way around this?


J2EE Architect/Developer
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10067
    
163

Have you configured your datasources to be XA?


[My Blog] [JavaRanch Journal]
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
Not really, but thanks Jaikiran Pai, I'll try that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Could not enlist in transaction on entering meta-aware object!