org.phoenix.basic.paging.SystemRequestHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phoenix_db Show documentation
Show all versions of phoenix_db Show documentation
对hibernate4的封装。封装了Druid,通过Druid可以轻量级的对其他数据库进行操作
The newest version!
package org.phoenix.basic.paging;
/**
* 请求上下文控制器
* @author mengfeiyang
*
*/
public class SystemRequestHolder {
private final static ThreadLocal systemRequesthreadLocal = new ThreadLocal();
public static void initRequestHolder(SystemRequest systemRequest) {
systemRequesthreadLocal.set(systemRequest);
}
public static SystemRequest getSystemRequest() {
return systemRequesthreadLocal.get();
}
public static void remove() {
systemRequesthreadLocal.remove();
}
}