As stated in this thread. I have a batch import process that really works very badly with JPA, and I need a way to get back to pure JDBC calls to complete the job.
Apparently you can call:
Connection c = ((EntityManagerImpl)(em.getDelegate())).getServerSession().getAccessor().getConnection();
But I do not know what to do to release and / or close it after completion.
source
share