Tabnine Logo
JDBCSessionDao.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.ning.billing.util.security.shiro.dao.JDBCSessionDao
constructor

Best Java code snippets using com.ning.billing.util.security.shiro.dao.JDBCSessionDao.<init> (Showing top 2 results out of 315)

origin: com.ning.billing/killbill-util

  @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;
  }
}
origin: com.ning.billing/killbill-util

@Test(groups = "slow")
public void testCRUD() throws Exception {
  // Note! We are testing the do* methods here to bypass the caching layer
  final JDBCSessionDao jdbcSessionDao = new JDBCSessionDao((DBI) dbi);
  // Retrieve
  final SimpleSession session = createSession();
  Assert.assertNull(jdbcSessionDao.doReadSession(session.getId()));
  // Create
  final Serializable sessionId = jdbcSessionDao.doCreate(session);
  final Session retrievedSession = jdbcSessionDao.doReadSession(sessionId);
  Assert.assertEquals(retrievedSession, session);
  // Update
  final String newHost = UUID.randomUUID().toString();
  Assert.assertNotEquals(retrievedSession.getHost(), newHost);
  session.setHost(newHost);
  jdbcSessionDao.doUpdate(session);
  Assert.assertEquals(jdbcSessionDao.doReadSession(sessionId).getHost(), newHost);
  // Delete
  jdbcSessionDao.doDelete(session);
  Assert.assertNull(jdbcSessionDao.doReadSession(session.getId()));
}
com.ning.billing.util.security.shiro.daoJDBCSessionDao<init>

Popular methods of JDBCSessionDao

  • assignSessionId
  • doCreate
  • doDelete
  • doReadSession
  • doUpdate

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • findViewById (Activity)
  • putExtra (Intent)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • JFileChooser (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now