Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2216

Timerservice Table Creation is erroneously omitted if tables (TIMER, CALENDAR_TIMER, ...) exist in a foreign Database Schema (DB2 9.7)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • timerservice-mk2
    • None

      Changing DefaultDS to a DB2 Database which hosts multiple JBossAS instances in different schemas leads to deplomyent errors due to missing EJB3 Timerservice tables.

      The search for existing EJB3 Timerservice tables (TIMER, TIMEOUT_METHOD, CALENDAR_TIMER, TIMEOUTMETHOD_METHODPARAMS) is not restricted to the current schema. In case of existing tables within a foreign schema (which is different from the current user/schema) the required tables are not created for the current schema even though they are not available.

      In the example below tables are found within the unrelated USER01 schema even thought the current user/schema for DefaultDS is USER02:

      16:37:46,188 DEBUG [Configuration] resolving reference to class: org.jboss.ejb3.timerservice.mk2.persistence.TimeoutMethod
      16:37:46,188 DEBUG [Configuration] resolving reference to class: org.jboss.ejb3.timerservice.mk2.persistence.TimerEntity
      16:37:46,188 DEBUG [Configuration] resolving reference to class: org.jboss.ejb3.timerservice.mk2.persistence.TimeoutMethod
      16:37:46,631 INFO [TableMetadata] table found: USER01.TIMEOUTMETHOD_METHODPARAMS
      16:37:46,632 INFO [TableMetadata] columns: [methodparams, timeoutmethod_id]
      16:37:46,632 INFO [TableMetadata] foreign keys: [fkf294c964b7de2d8a]
      16:37:46,632 INFO [TableMetadata] indexes: []
      16:37:46,774 INFO [TableMetadata] table found: USER01.CALENDAR_TIMER
      ...
      16:38:38,670 DEBUG [JDBCExceptionReporter] could not execute query [select timerentit0_.id as id0_, timerentit0_.info as info0_, timerentit0_.initialDate as initialD3_0_, timerentit0_.nextDate as nextDate0_, timerentit0_.previousRun as previous5_0_, timerentit0_.repeatInterval as repeatIn6_0_, timerentit0_.timedObjectId as timedObj7_0_, timerentit0_.timerState as timerState0_, timerentit0_1_.autoTimer as autoTimer2_, timerentit0_1_.scheduleExprDayOfMonth as schedule2_2_, timerentit0_1_.scheduleExprDayOfWeek as schedule3_2_, timerentit0_1_.scheduleExprEndDate as schedule4_2_, timerentit0_1_.scheduleExprHour as schedule5_2_, timerentit0_1_.scheduleExprMinute as schedule6_2_, timerentit0_1_.scheduleExprMonth as schedule7_2_, timerentit0_1_.scheduleExprSecond as schedule8_2_, timerentit0_1_.scheduleExprStartDate as schedule9_2_, timerentit0_1_.scheduleExprTimezone as schedul10_2_, timerentit0_1_.scheduleExprYear as schedul11_2_, timerentit0_1_.timeoutMethod_id as timeout13_2_, case when timerentit0_1_.id is not null then 1 when timerentit0_.id is not null then 0 end as clazz_ from timer timerentit0_ left outer join calendar_timer timerentit0_1_ on timerentit0_.id=timerentit0_1_.id where timerentit0_.timedObjectId=? and (timerentit0_.timerState not in (? , ?))]: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=USER02.TIMER, DRIVER=3.61.75

      There has been a comparable issue in the EJBTimerService: https://issues.jboss.org/browse/JBAS-4042

              jaikiran Jaikiran Pai (Inactive)
              r.reimann_jira Robert Reimann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated: