Table of Contents
OpenJPA deployment includes choosing a factory deployment strategy, and in a managed environment, optionally integrating with your application server's managed and XA transactions. This chapter examines each aspect of deployment in turn.
OpenJPA offers two
The JPA Overview describes the
class. You can use
Persistence to obtain
EntityManagerFactory instances, as demonstrated in
. OpenJPA also extends
Persistence to add additional
EntityManagerFactory creation methods. The
Javadoc details these extensions.
After obtaining the factory, you can cache it for all
EntityManager creation duties. OpenJPA factories support being
bound to JNDI as well.
Java EE application servers allow you to inject
entity managers into your session beans using the
annotation. See your application server documentation for details.