org.activemath.util.db
Class MybatisHelper
java.lang.Object
org.activemath.util.db.MybatisHelper
public class MybatisHelper
- extends Object
|
Method Summary |
org.apache.ibatis.session.SqlSession |
getAMCoreSession()
Opens a new MyBatis session connected to the database
backend for the core Activemath application and returns it. |
static MybatisHelper |
getInstance()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static Logger log
getInstance
public static MybatisHelper getInstance()
getAMCoreSession
public org.apache.ibatis.session.SqlSession getAMCoreSession()
- Opens a new MyBatis session connected to the database
backend for the core Activemath application and returns it.
The session returned *is* thread-safe, as it is handled as a managed session by
SqlSessionManager.
However, it is vital to close() this session when you're done (using a finally branch).
- Returns:
- A freshly opened Mybatis session that is thread-safe, managed internally by a
ThreadLocal.