Class AbstractServerApplication

    • Constructor Detail

      • AbstractServerApplication

        public AbstractServerApplication​(String name,
                                         String version)
        Creates a server.
        Parameters:
        name - the server's name
        version - the application version
    • Method Detail

      • getSessionPool

        public org.tentackle.session.SessionPool getSessionPool()
        Specified by:
        getSessionPool in interface org.tentackle.session.SessionPoolProvider
      • getRemoteSessionPool

        public org.tentackle.session.MultiUserSessionPool getRemoteSessionPool()
        Specified by:
        getRemoteSessionPool in interface org.tentackle.session.SessionPoolProvider
      • setSessionInfo

        protected void setSessionInfo​(org.tentackle.session.SessionInfo sessionInfo)

        Overwridden to protect the sessioninfo once it is set.

        Overrides:
        setSessionInfo in class AbstractApplication
      • createSessionPool

        public org.tentackle.session.SessionPool createSessionPool()
        Creates the session pool to serve the client sessions.
        Returns:
        the session pool
      • createRemoteSessionPool

        public org.tentackle.session.MultiUserSessionPool createRemoteSessionPool()
        Creates the remote session pool to serve the client sessions.
        Returns:
        the session pool
      • getSession

        public Db getSession()
        Specified by:
        getSession in interface org.tentackle.session.SessionProvider
        Overrides:
        getSession in class AbstractApplication
      • createConnectionManager

        protected ConnectionManager createConnectionManager()
        Creates the connection manager for the client sessions. The default creates an MpxConnectionManager.
        Returns:
        the connection manager
      • configureSessionInfo

        protected void configureSessionInfo​(org.tentackle.session.SessionInfo sessionInfo)
        Configures the session info.
        Parameters:
        sessionInfo - the session info
      • login

        protected void login()
        Connects the server to the database backend or another remote server.
      • isRunningInContainer

        public boolean isRunningInContainer()
        Indicates whether this application is running within a container.
        Returns:
        true if running in a container, false if not
      • detectContainer

        protected void detectContainer()
        Detects whether this application is running within a container.
        The result can be retrieved by isRunningInContainer().
      • deregisterJdbcDrivers

        protected void deregisterJdbcDrivers​(ClassLoader cl)
        Deregisters all JDBC-Drivers loaded by the app's classloader.
        Necessary in containers only (in case connected directly via JDBC and not via JNDI). Avoids memleaks.
        Parameters:
        cl - the app's classloader