接口的使用
org.springframework.jdbc.datasource.ConnectionHandle
使用ConnectionHandle的程序包 程序包 说明 org.springframework.jdbc.datasource Provides a utility class for easy DataSource access, a PlatformTransactionManager for a single DataSource, and various simple DataSource implementations.org.springframework.orm.jpa Package providing integration of JPA (Java Persistence API) with Spring concepts.org.springframework.orm.jpa.vendor Support classes for adapting to specific JPA vendors.org.springframework.jdbc.datasource中ConnectionHandle的使用
实现ConnectionHandle的org.springframework.jdbc.datasource中的类 修饰符和类型 类 说明 classSimpleConnectionHandleSimple implementation of theConnectionHandleinterface, containing a given JDBC Connection.返回ConnectionHandle的org.springframework.jdbc.datasource中的方法 修饰符和类型 方法 说明 ConnectionHandleConnectionHolder. getConnectionHandle()Return the ConnectionHandle held by this ConnectionHolder.参数类型为ConnectionHandle的org.springframework.jdbc.datasource中的构造器 构造器 说明 ConnectionHolder(ConnectionHandle connectionHandle)Create a new ConnectionHolder for the given ConnectionHandle.org.springframework.orm.jpa中ConnectionHandle的使用
返回ConnectionHandle的org.springframework.orm.jpa中的方法 修饰符和类型 方法 说明 ConnectionHandleDefaultJpaDialect. getJdbcConnection(EntityManager entityManager, boolean readOnly)This implementation always returnsnull, indicating that no JDBC Connection can be provided.ConnectionHandleJpaDialect. getJdbcConnection(EntityManager entityManager, boolean readOnly)Retrieve the JDBC Connection that the given JPA EntityManager uses underneath, if accessing a relational database.参数类型为ConnectionHandle的org.springframework.orm.jpa中的方法 修饰符和类型 方法 说明 voidDefaultJpaDialect. releaseJdbcConnection(ConnectionHandle conHandle, EntityManager em)This implementation does nothing, assuming that the Connection will implicitly be closed with the EntityManager.voidJpaDialect. releaseJdbcConnection(ConnectionHandle conHandle, EntityManager entityManager)Release the given JDBC Connection, which has originally been retrieved viagetJdbcConnection.org.springframework.orm.jpa.vendor中ConnectionHandle的使用
返回ConnectionHandle的org.springframework.orm.jpa.vendor中的方法 修饰符和类型 方法 说明 ConnectionHandleEclipseLinkJpaDialect. getJdbcConnection(EntityManager entityManager, boolean readOnly)ConnectionHandleHibernateJpaDialect. getJdbcConnection(EntityManager entityManager, boolean readOnly)