Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Henrique Ordine
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you configured your datasources to be XA?
 
Henrique Ordine
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really, but thanks Jaikiran Pai, I'll try that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic