com.github.drinkjava2.jtransactions.jfinal
Class JFinalTxConnectionManager
java.lang.Object
com.github.drinkjava2.jtransactions.jfinal.JFinalTxConnectionManager
- All Implemented Interfaces:
- ConnectionManager
public class JFinalTxConnectionManager
- extends Object
- implements ConnectionManager
JFinalConnectionManager is the implementation of ConnectionManager, get
connection and release connection from jFinal environment
- Since:
- 1.0.0
- Author:
- Yong Zhu
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getConfigMethod
protected final Method getConfigMethod
getConnectionMethod
protected final Method getConnectionMethod
releaseConnectionMethod
protected final Method releaseConnectionMethod
isInTransactionMethod
protected final Method isInTransactionMethod
JFinalTxConnectionManager
public JFinalTxConnectionManager()
instance
public static final JFinalTxConnectionManager instance()
- Returns:
- A singleton
getConnection
public Connection getConnection(DataSource dataSource)
- Description copied from interface:
ConnectionManager
- A ConnectionManager implementation determine how to get connection from
DataSource or ThreadLocal or from Spring or JTA or some container...
- Specified by:
getConnection in interface ConnectionManager
releaseConnection
public void releaseConnection(Connection conn,
DataSource dataSource)
- Description copied from interface:
ConnectionManager
- A ConnectionManager implementation determine how to close connection or
return connection to ThreadLocal or return to Spring or JTA or some
container...
- Specified by:
releaseConnection in interface ConnectionManager
isInTransaction
public boolean isInTransaction(DataSource ds)
- Description copied from interface:
ConnectionManager
- Check if a connection already be get from given dataSource and be cached as
it started a Transaction
- Specified by:
isInTransaction in interface ConnectionManager
Copyright © 2018. All rights reserved.