Creates a new EM manager that handles its own transactions.
Creates a new EM manager that handles its own transactions.
The persistence unit name that this EM should represent
Creates a new EM manager with the specified transaction management.
Creates a new EM manager with the specified transaction management.
* @param unitName The persistence unit name that this EM should represent
controls whether the user is responsible for handling transactions.
true
means that the user will begin and end transactions,
false
means that the LocalEM will handle it for the user.
Creates a new EM manager with the specified transaction management and configuration properties.
Creates a new EM manager with the specified transaction management and configuration properties. This is a convenience constructor so that you're not required to pass an Option.
The persistence unit name that this EM should represent
controls whether the user is responsible for handling transactions.
true
means that the user will begin and end transactions,
false
means that the LocalEM will handle it for the user.
A map containing additional properties to use when creating the factory.
The persistence unit name that this EM should represent
controls whether the user is responsible for handling transactions.
true
means that the user will begin and end transactions,
false
means that the LocalEM will handle it for the user.
Closes the underlying EM and handles the transaction if configured to do so.
Closes the underlying EM and handles the transaction if configured to do so.
The EntityManager
to close
Return the name of the configured persistence unit name
Return the name of the configured persistence unit name
Returns a newly created ScalaEntityManager
.
Returns a newly created ScalaEntityManager
. This is the method
that clients would typically use to obtain their EM.
A new ScalaEntityManager
instance.
Opens an EntityManager
retrieved from the EntityManagerFactory
for the given persistence unit.
Opens an EntityManager
retrieved from the EntityManagerFactory
for the given persistence unit.
An appropriately configured EntityManager
Closes the underlying EMF.
Closes the underlying EMF. This should be called to release any held resources to prevent memory leaks.
The persistence unit name that this EM should represent
controls whether the user is responsible for handling transactions.
controls whether the user is responsible for handling transactions.
true
means that the user will begin and end transactions,
false
means that the LocalEM will handle it for the user.
This class represents an EntityManager factory that is retrieved via the javax.persistence.Persistence factory class. Typically this is used in an environment that doesn't support JNDI. An example of usage would be: