Class JdbcService

    • Constructor Detail

      • JdbcService

        public JdbcService()
    • Method Detail

      • closeJdbcService

        protected abstract void closeJdbcService()
        Close the service.

        This is called before the connection is closed

      • startService

        protected abstract void startService()
                                      throws CoreException
        Start the service.

        This is called after the connection is started

        Throws:
        CoreException
      • stop

        public void stop()
        Description copied from interface: ComponentLifecycle
        Stop the component

        A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer, calling stop will pause message delivery. Throwing a RuntimeException may cause unintended consequences

        Specified by:
        stop in interface ComponentLifecycle
        Overrides:
        stop in class ServiceImp
      • stopService

        protected abstract void stopService()
        Stop the service.

        This is called after before the connection is stopped

      • getConnection

        protected java.sql.Connection getConnection​(AdaptrisMessage msg)
                                             throws java.sql.SQLException
        Get the Connection either from the AdaptrisMessage object or from configuration.
        Parameters:
        msg - the adaptrisMessage object
        Returns:
        the connection either from the adaptris message or from configuration.
        Throws:
        java.sql.SQLException
      • getStatementTimeout

        public TimeInterval getStatementTimeout()
      • setStatementTimeout

        public void setStatementTimeout​(TimeInterval statementTimeout)
        Set the statement timeout.
        Parameters:
        statementTimeout - the statement timeout.
        Since:
        3.0.1
      • createStatement

        protected java.sql.Statement createStatement​(java.sql.Connection c)
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • prepareStatement

        protected java.sql.PreparedStatement prepareStatement​(java.sql.Connection c,
                                                              java.lang.String sql)
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • prepareStatement

        protected java.sql.PreparedStatement prepareStatement​(java.sql.Connection c,
                                                              java.lang.String sql,
                                                              int autoGenKeys)
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • applyTimeout

        protected void applyTimeout​(java.sql.Statement stmt)
                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException