> Since the GUI itself will be a single thread, do we use a single
EntityManager for the GUI, and allow the PersistenceContext to exist for the
lifetime of the application?

Use single EntityManager.

> Does each network protocol thread create its own
> EntityManager/PersistenceContext?  Or, do we use OpenJPA's multi-threaded
> feature and share the GUI's PersistenceContext?

Use openjpa.Multithreaded and share GUI's persistence context

> If the network protocol threads use individual PCs, how do we reliably
> ensure that the GUI's PC sees the changes?

If network protocol threads updating database records directly i.e. not via
JPA API, then use em.refresh() after they are done to make the database
change reflect in GUI's peristence context.



-- 
View this message in context: 
http://www.nabble.com/Extended-Persistence-Context-in-multi-threaded-app-tp15160167p15163993.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to