Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-10915

[GSS](7.0.z) HHH-11740 HHH-11499 Default MultiTableBulkIdStrategy for DB2 does not work with connection pools

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.0.7.CR1, 7.0.7.GA
    • 7.0.5.GA, 7.0.6.CR2
    • Hibernate
    • None
    • Documentation (Ref Guide, User Guide, etc.)
    • Regression
    • +
    • Workaround Exists
    • Hide

      1) create a custom Dialect that extends DB2Dialect and overrides #getDefaultMultiTableBulkIdStrategy as follows:

      {{ @Override
      public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy() {
      // Starting in DB2 9.7, "real" global temporary tables that can be shared between sessions
      // are supported; (obviously) data is not shared between sessions.
      return new GlobalTemporaryTableBulkIdStrategy(
      new IdTableSupportStandardImpl() {
      @Override
      public String generateIdTableName(String baseName)

      { return super.generateIdTableName( baseName ); }

      @Override
      public String getCreateIdTableCommand()

      { return "create global temporary table"; }

      @Override
      public String getCreateIdTableStatementOptions()

      { return "not logged"; }

      },
      AfterUseAction.CLEAN
      );
      }
      }}

      2) provide a custom MultiTableBulkIdStrategy implementation defined like the return value in 1), using hibernate.hql.bulk_id_strategy=custom_strategy

      Show
      1) create a custom Dialect that extends DB2Dialect and overrides #getDefaultMultiTableBulkIdStrategy as follows: {{ @Override public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy() { // Starting in DB2 9.7, "real" global temporary tables that can be shared between sessions // are supported; (obviously) data is not shared between sessions. return new GlobalTemporaryTableBulkIdStrategy( new IdTableSupportStandardImpl() { @Override public String generateIdTableName(String baseName) { return super.generateIdTableName( baseName ); } @Override public String getCreateIdTableCommand() { return "create global temporary table"; } @Override public String getCreateIdTableStatementOptions() { return "not logged"; } }, AfterUseAction.CLEAN ); } }} 2) provide a custom MultiTableBulkIdStrategy implementation defined like the return value in 1), using hibernate.hql.bulk_id_strategy= custom_strategy
    • EAP 7.0.7

            gbadner@redhat.com Gail Badner (Inactive)
            rhn-support-sfikes Stephen Fikes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: