private static class EclipseLinkJpaDialect.EclipseLinkConnectionHandle extends java.lang.Object implements ConnectionHandle
ConnectionHandle
implementation that lazily fetches an
EclipseLink-provided Connection on the first getConnection
call -
which may never come if no application code requests a JDBC Connection.
This is useful to defer the early transaction begin that obtaining a
JDBC Connection implies within an EclipseLink EntityManager.Modifier and Type | Field and Description |
---|---|
private java.sql.Connection |
connection |
private EntityManager |
entityManager |
Constructor and Description |
---|
EclipseLinkConnectionHandle(EntityManager entityManager) |
Modifier and Type | Method and Description |
---|---|
java.sql.Connection |
getConnection()
Fetch the JDBC Connection that this handle refers to.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
releaseConnection
private final EntityManager entityManager
@Nullable private java.sql.Connection connection
public EclipseLinkConnectionHandle(EntityManager entityManager)
public java.sql.Connection getConnection()
ConnectionHandle
getConnection
in interface ConnectionHandle