Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application-managed persistence context in EJB

 
Oliver Chua
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm following Mikalai Zaikin's SCBCD reviewer.
I'm trying to create an application-managed persistenace context in an EJB.

As far as I understood it, in EJB, for application-managed persistenace context,
the transaction-demarcation is still done by the container.
However, my test using Jboss is not being committed.

It stops at prePersist, and without any errors.
The test fails when it tries to retrieve the newly inserter

Could anybody give a clue why the transaction is not being committed?
Thanks!

Below are the files involved:

persistence.xml


Session Bean


Entity


Tester
 
Oliver Chua
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This seems to be a case of server caching.
It's now working.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic