Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2636

Attribute "table-name" for Database Persistence in JBOSS subsystem isn't set properly

    Details

    • Steps to Reproduce:
      1. Configure a custom "table-name" attribute for "db-persistence" in a repository in the Modeshape JBOSS subsystem
      2. Created table has the default name "MODESHAPE_REPOSITORY"

      Description

      The attribute "table-name" in the "db-persistence" repository configuration for the JBOSS subsystem isn't set properly during startup. The DB persistence always uses the default table name "MODESHAPE_REPOSITORY".

      The cause of this bug is in the class org.modeshape.jboss.subsystem.AddDatabasePersistence in modeshape-jbossas-subsystem.
      Within the method "performRuntime" all ModelAttributes for DatabasePersistence are set for the persistenceConfig - except TABLE_NAME.

      The following code should be inserted to record the ModelAttributes.TABLE_NAME property:

      ModelNode tableName = TABLE_NAME.resolveModelAttribute(context, operation);
      if (tableName.isDefined()) {
            persistenceConfig.setString(TABLE_NAME.getFieldName(), tableName.asString());
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                kaape Kornelius Prell
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: