Class DbTrackingModule

    • Field Detail

      • PARAM_TCP_SERVER_START

        public static final java.lang.String PARAM_TCP_SERVER_START
        See Also:
        Constant Field Values
      • PARAM_TCP_SERVER_PORT

        public static final java.lang.String PARAM_TCP_SERVER_PORT
        See Also:
        Constant Field Values
      • PARAM_TCP_SERVER_PWD

        public static final java.lang.String PARAM_TCP_SERVER_PWD
        See Also:
        Constant Field Values
      • PARAM_TABLE_NAME

        public static final java.lang.String PARAM_TABLE_NAME
        See Also:
        Constant Field Values
      • PARAM_DB_DIRECTORY

        public static final java.lang.String PARAM_DB_DIRECTORY
        See Also:
        Constant Field Values
      • PARAM_JDBC_CONNECT_STRING

        public static final java.lang.String PARAM_JDBC_CONNECT_STRING
        See Also:
        Constant Field Values
      • PARAM_JDBC_DRIVER

        public static final java.lang.String PARAM_JDBC_DRIVER
        See Also:
        Constant Field Values
      • PARAM_JDBC_SERVER_URL

        public static final java.lang.String PARAM_JDBC_SERVER_URL
        See Also:
        Constant Field Values
      • PARAM_JDBC_PARAMS

        public static final java.lang.String PARAM_JDBC_PARAMS
        See Also:
        Constant Field Values
      • PARAM_SQL_ESCAPE_CHARACTER

        public static final java.lang.String PARAM_SQL_ESCAPE_CHARACTER
        See Also:
        Constant Field Values
      • PARAM_USE_EMBEDDED_DB

        public static final java.lang.String PARAM_USE_EMBEDDED_DB
        See Also:
        Constant Field Values
      • PARAM_FORCE_LOAD_JDBC_DRIVER

        public static final java.lang.String PARAM_FORCE_LOAD_JDBC_DRIVER
        See Also:
        Constant Field Values
      • dbUser

        private java.lang.String dbUser
      • dbPwd

        private java.lang.String dbPwd
      • jdbcConnectString

        private java.lang.String jdbcConnectString
      • configBaseDir

        private java.lang.String configBaseDir
      • jdbcDriver

        private java.lang.String jdbcDriver
      • isRunning

        private boolean isRunning
      • sqlEscapeChar

        private java.lang.String sqlEscapeChar
      • useEmbeddedDB

        private boolean useEmbeddedDB
      • forceLoadJdbcDriver

        private boolean forceLoadJdbcDriver
      • dbPlatform

        private java.lang.String dbPlatform
      • tableName

        private java.lang.String tableName
      • logger

        private org.apache.commons.logging.Log logger
    • Constructor Detail

      • DbTrackingModule

        public DbTrackingModule()
    • Method Detail

      • init

        public void init​(Session session,
                         java.util.Map<java.lang.String,​java.lang.String> options)
                  throws OpenAS2Exception
        Description copied from interface: Component
        Component lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.
        Specified by:
        init in interface Component
        Overrides:
        init in class BaseMsgTrackingModule
        Parameters:
        session - the component uses this object to access other components
        options - configuration values for the component
        Throws:
        OpenAS2Exception - If an error occurs while initializing the component
        See Also:
        Session
      • formatField

        private java.lang.String formatField​(java.lang.String value,
                                             int dataType)
      • appendFieldForUpdate

        private void appendFieldForUpdate​(java.lang.String name,
                                          java.lang.String value,
                                          java.lang.StringBuffer sb,
                                          int dataType)
      • appendFieldForInsert

        private void appendFieldForInsert​(java.lang.String name,
                                          java.lang.String value,
                                          java.lang.StringBuffer names,
                                          java.lang.StringBuffer values,
                                          int dataType)
      • isRunning

        public boolean isRunning()
      • stop

        public void stop()
      • healthcheck

        public boolean healthcheck​(java.util.List<java.lang.String> failures)
        Description copied from interface: ActiveModule
        When invoked, the module must run a self check to verify it is functioning correctly. Any failures must be reported in the failures list passed in to the method by the callee
        Parameters:
        failures - - a list of failures if any occur
        Returns:
        - true if module has no problems otherwise false ith failure messages in passed in List