public static class ThreadLocalConnection.GroupedConnection extends Object
Constructor and Description |
---|
GroupedConnection() |
Modifier and Type | Method and Description |
---|---|
ThreadLocalConnection.GroupedConnection |
close(DataSource ds)
关闭并移除Connection
如果处于事务中,则不进行任何操作 |
Connection |
get(DataSource ds)
获取连接,如果获取的连接为空或者已被关闭,重新创建连接
|
boolean |
isEmpty()
持有的连接是否为空
|
public Connection get(DataSource ds) throws SQLException
ds
- 数据源SQLException
- SQL异常public ThreadLocalConnection.GroupedConnection close(DataSource ds)
ds
- 数据源public boolean isEmpty()
Copyright © 2024. All rights reserved.