JPA - Understanding PersistenceContext in Java Persistence API

One of the most important things when dealing with any system is having a model in your mind of how the system works. As with most abstractions it is not necessary that the model reflects how the system is implemented as long as it allows one to make accurate predictions on how certain actions will result in predictable events. The model may even be wrong but seem to work. I have a very bad model for how my Microwaves and Video player work and hence am restricted to using only a couple of buttons. Whenever the dog sits on the remote and the screen turns to snow I just push buttons frantically until it works again.

 Persistence Context Explained

 When JPA came out I had a very hazy understanding of the persistence context. I understood sessions from Hibernate but could not wrap my head around the JPA implementation of this even though they are very close. Yesterday while searching for something unrelated I serendipitously cam across this great explanation from Apache's OpenJPA

Refer to if JPA persistence context confuses you. 


Eagle 20, you hammered !!!!. What an informative serendipitously excellent article

Millions of coding legions are coding in the Dark !!!!!