2

There's a lot of technical "blurp" out on the Internet, books and elsewhere where you can read a lot about how to setup container-managed persistence contexts etc., but none of the sources I've found deal with the much more difficult question:

How do you decide on which type of container-managed persistence context to use? How do you decide between container-managed transaction-scoped and container-managed extended persistence contexts conceptually?

How do you approach this? What are the crucial points here? Is there a more-or-less generally accepted policy that can be applied? Maybe we/you can develop one here...

I'm really struggling to find a useful answer to this. Help highly appreciated.

Kawu
  • 13,647
  • 34
  • 123
  • 195

1 Answers1

2

According to here and here, you would use the Extended Persistence Context only if you deal with stateful EJBs.

Community
  • 1
  • 1
Luciano
  • 8,552
  • 5
  • 32
  • 56
  • Well, because I didn't post the question as I should have, this only applies to directly injecting an entity manager into some bean via `@PersistenceContext`. – Kawu Mar 08 '12 at 10:39