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

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


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.3.0.Final
    • 5.2.0.Final
    • Configuration
    • None
      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"

      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());

            hchiorean Horia Chiorean (Inactive)
            kaape Kornelius Prell (Inactive)
            1 Vote for this issue
            2 Start watching this issue