org.eclipse.jetty.server.session

Class JDBCSessionIdManager

  • All Implemented Interfaces:
    SessionIdManager, LifeCycle


    public class JDBCSessionIdManagerextends AbstractSessionIdManager
    JDBCSessionIdManager SessionIdManager implementation that uses a database to store in-use session ids, to support distributed sessions.
    • Field Detail

      • _server

        protected Server _server
      • _driver

        protected Driver _driver
      • _driverClassName

        protected String _driverClassName
      • _connectionUrl

        protected String _connectionUrl
      • _jndiName

        protected String _jndiName
      • _sessionIdTable

        protected String _sessionIdTable
      • _sessionTable

        protected String _sessionTable
      • _sessionTableRowId

        protected String _sessionTableRowId
      • _timer

        protected Timer _timer
      • _lastScavengeTime

        protected long _lastScavengeTime
      • _scavengeIntervalMs

        protected long _scavengeIntervalMs
      • _blobType

        protected String _blobType
      • _longType

        protected String _longType
      • _createSessionIdTable

        protected String _createSessionIdTable
      • _createSessionTable

        protected String _createSessionTable
      • _selectBoundedExpiredSessions

        protected String _selectBoundedExpiredSessions
      • _deleteOldExpiredSessions

        protected String _deleteOldExpiredSessions
      • _insertId

        protected String _insertId
      • _deleteId

        protected String _deleteId
      • _queryId

        protected String _queryId
      • _insertSession

        protected String _insertSession
      • _deleteSession

        protected String _deleteSession
      • _updateSession

        protected String _updateSession
      • _updateSessionNode

        protected String _updateSessionNode
      • _updateSessionAccessTime

        protected String _updateSessionAccessTime
    • Constructor Detail

      • JDBCSessionIdManager

        public JDBCSessionIdManager(Server server)
      • JDBCSessionIdManager

        public JDBCSessionIdManager(Server server,                    Random random)
    • Method Detail

      • setDriverInfo

        public void setDriverInfo(String driverClassName,                 String connectionUrl)
        Configure jdbc connection information via a jdbc Driver
        Parameters:
        driverClassName -
        connectionUrl -
      • setDriverInfo

        public void setDriverInfo(Driver driverClass,                 String connectionUrl)
        Configure jdbc connection information via a jdbc Driver
        Parameters:
        driverClass -
        connectionUrl -
      • setDatasource

        public void setDatasource(DataSource ds)
      • getDriverClassName

        public String getDriverClassName()
      • getConnectionUrl

        public String getConnectionUrl()
      • setDatasourceName

        public void setDatasourceName(String jndi)
      • getDatasourceName

        public String getDatasourceName()
      • setBlobType

        public void setBlobType(String name)
      • getBlobType

        public String getBlobType()
      • getLongType

        public String getLongType()
      • setLongType

        public void setLongType(String longType)
      • setScavengeInterval

        public void setScavengeInterval(long sec)
      • getScavengeInterval

        public long getScavengeInterval()
      • addSession

        public void addSession(javax.servlet.http.HttpSession session)
        Description copied from interface: SessionIdManager
        Add a session to the list of known sessions for a given ID.
        Parameters:
        session - The session
      • removeSession

        public void removeSession(javax.servlet.http.HttpSession session)
        Description copied from interface: SessionIdManager
        Remove session from the list of known sessions for a given ID.
      • removeSession

        public void removeSession(String id)
      • idInUse

        public boolean idInUse(String id)
        Parameters:
        id - The session ID without any cluster node extension
        Returns:
        True if the session ID is in use by at least one context.
      • doStart

        public void doStart()
        Start up the id manager. Makes necessary database tables and starts a Session scavenger thread.
        Overrides:
        doStart in class AbstractSessionIdManager
      • getConnection

        protected Connection getConnection()                            throws SQLException
        Get a connection from the driver or datasource.
        Returns:
        the connection for the datasource
        Throws:
        SQLException

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14