Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6317

ActiveMQ createSchemaStatements are not executed on init if a previous createSchemaStatement failed on execution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.12.3, 5.13.3
    • 5.14.0
    • JDBC
    • None
    • PostgreSql, Linux, Mac OS X

    Description

      On init the DefaultJDBCAdapter.doCreateTables-method is executed. This provides the tables needed for ActiveMQ in persistent mode.

      The createSchemaStatements are executed within one SQL Statement.
      When one of the createSchemaStatements throws an SQLException (table already exists) the SQL Statement's transaction is aborted and all following createSchemaStatements are ignored.

      This is unwanted behaviour as the comment on the code block states that new statements like for example 'ALTER TABLE' (introduced in new versions of activemq) should be executed if the tables already exist.

      We had this issue when adding an extra createSchemaStatement for a JobScheduler table.

      Attachments

        Issue Links

          Activity

            People

              gtully Gary Tully
              JBastijns Jeroen Bastijns
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: