Search in sources :

Example 1 with JDBCSessionDao

use of org.killbill.billing.util.security.shiro.dao.JDBCSessionDao in project killbill by killbill.

the class SessionDAOProvider method get.

@Override
public SessionDAO get() {
    final CachingSessionDAO sessionDao;
    if (redisCacheConfig.isRedisCachingEnabled()) {
        sessionDao = new RedisSessionDao();
    } else {
        sessionDao = new JDBCSessionDao(dbi, roDbi);
    }
    if (sessionManager instanceof DefaultSessionManager) {
        final DefaultSessionManager defaultSessionManager = (DefaultSessionManager) sessionManager;
        defaultSessionManager.setSessionDAO(sessionDao);
        defaultSessionManager.setGlobalSessionTimeout(rbacConfig.getGlobalSessionTimeout().getMillis());
    }
    return sessionDao;
}
Also used : DefaultSessionManager(org.apache.shiro.session.mgt.DefaultSessionManager) JDBCSessionDao(org.killbill.billing.util.security.shiro.dao.JDBCSessionDao) RedisSessionDao(org.killbill.billing.util.security.shiro.dao.RedisSessionDao) CachingSessionDAO(org.apache.shiro.session.mgt.eis.CachingSessionDAO)

Example 2 with JDBCSessionDao

use of org.killbill.billing.util.security.shiro.dao.JDBCSessionDao in project killbill by killbill.

the class JDBCSessionDaoProvider method get.

@Override
public JDBCSessionDao get() {
    final JDBCSessionDao jdbcSessionDao = new JDBCSessionDao(dbi);
    if (sessionManager instanceof DefaultSessionManager) {
        final DefaultSessionManager defaultSessionManager = (DefaultSessionManager) sessionManager;
        defaultSessionManager.setSessionDAO(jdbcSessionDao);
        defaultSessionManager.setGlobalSessionTimeout(rbacConfig.getGlobalSessionTimeout().getMillis());
    }
    return jdbcSessionDao;
}
Also used : DefaultSessionManager(org.apache.shiro.session.mgt.DefaultSessionManager) JDBCSessionDao(org.killbill.billing.util.security.shiro.dao.JDBCSessionDao)

Aggregations

DefaultSessionManager (org.apache.shiro.session.mgt.DefaultSessionManager)2 JDBCSessionDao (org.killbill.billing.util.security.shiro.dao.JDBCSessionDao)2 CachingSessionDAO (org.apache.shiro.session.mgt.eis.CachingSessionDAO)1 RedisSessionDao (org.killbill.billing.util.security.shiro.dao.RedisSessionDao)1