6 Replies Latest reply on Jul 12, 2008 3:53 PM by Chris Meadows

    Specifying the schema for EJBTimerService's TIMERS database

    jonathanztaub Newbie

      I'm trying to configure all of JBoss' related services database table to reside in their own schema (jboss). The database with the name of "jboss" was created and I was able to change successfully all of the JMS' configuration files to refer to this schema when performing create/insert/delete/select operations. This was easily accomplished by adding the schema name followed by a dot before the table's name.

      However, for the EJBTimerService, it doesn't seem to work:

       A persistence policy that persists timers to a database.
       The 2 supported db persistence plugins are:
       The table name defaults to "TIMERS". It can be overriden using the
       'TimersTable' attribute if the persistence plugin supports it.
       When overriding the timers table, an optional schema can be specified
       using the syntax [schema.]table
       <mbean code="org.jboss.ejb.txtimer.DatabasePersistencePolicy" name="jboss.ejb:service=EJBTimerService,persistencePolicy=database">
       <!-- DataSourceBinding ObjectName -->
       <depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=MySqlDs</depends>
       <!-- The plugin that handles database persistence -->
       <attribute name="DatabasePersistencePlugin">org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin</attribute>
       <!-- The timers table name -->
       <attribute name="TimersTable">jboss.TIMERS</attribute>

      Upon startup, I'm getting:

      17:39:46,459 WARN [ServiceController] Problem starting service jboss.ejb:service=EJBTimerService,persistencePolicy=database
      com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Incorrect table name 'jboss'

      Any ideas?