• Post Reply Bookmark Topic Watch Topic
  • New Topic

getTransaction method in EM

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the following method of a stateful session bean -

public void processAccount()
{
...
EntityTransaction et = em.getTransaction();
et.setRollbackOnly(); //2
...
}

What might be a possible outcome as a result of calling line //2 ...

This was the question from Enthuware. I don't find any getTransaction() in entity Manager. Isn't the question wrong.
 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was actualy refering to API from O'Rel EJB. The interface does include getTransaction();

Thanks, Anyways
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!