Methods Summary |
---|
public void | close()
throw new IllegalStateException("It is illegal to close an injected EntityManagerFactory");
|
public javax.persistence.EntityManager | createEntityManager()
return getDelegate().createEntityManager();
|
public javax.persistence.EntityManager | createEntityManager(java.util.Map map)
return delegate.createEntityManager(map);
|
public javax.persistence.EntityManagerFactory | getDelegate()
return delegate;
|
public javax.persistence.EntityManager | getEntityManager()
return new TransactionScopedEntityManager(managedFactory);
|
public boolean | isOpen()
return getDelegate().isOpen();
|
public void | readExternal(java.io.ObjectInput in)
String kernelName = in.readUTF();
PersistenceUnitDeployment deployment = PersistenceUnitRegistry.getPersistenceUnit(kernelName);
if (deployment == null) throw new IOException("Unable to find persistence unit in registry: " + kernelName);
managedFactory = deployment.getManagedFactory();
delegate = managedFactory.getEntityManagerFactory();
|
public void | writeExternal(java.io.ObjectOutput out)
out.writeUTF(managedFactory.getKernelName());
|