2 Replies Latest reply on Nov 9, 2011 1:46 PM by Vitor Rocha Munhoz

    JBoss 6.0.0.Final serialize timers

    p_kaiser Newbie


      I am running a two-node cluster using JBoss 6.0.0.Final. I have problems serializing my timers to a MSSQL- or ORALE-database.


      I migrated from JBoss 4.2.2GA. There the timers worked for single and clustermode. The timers are still running with JBoss 6 if I use the same JBoss in single-mode with the default configuration and hsql-database.


      The problem seems to be that the column "INFO" in the JBoss-table "TIMER" is to small. It is mapped as a "RAW" Type with just 255 characters. I need "BLOB" which has 4000.


      My Java-Code is as following:


      public static void enableTimer(SessionPrincipal sessionPrincipal, TimerService timerService, long period)
              if (timerService.getTimers().size() == 0)
                  //This call crashes
                  Timer timer =
                      timerService.createTimer(period, period, new Object[] { sessionPrincipal, new Long(period) });


      The Oracle-message is:


      ORA-12899: Wert zu groß für Spalte "MYAPP"."TIMER"."INFO" (aktuell: 1077, maximal: 255)

      SQL Error: 12899, SQLState: 72000


      I tried the following:

      1. Set the dialect in the server\all\deploy\MY-ds.xml

      2. I also set the dialect in server\all\deployers\ejb3.deployer\META-INF\jpa-deployers-jboss-beans.xml

      3. I added a mapping for java.io.Serializable in server\all\conf\standardjbosscmp-jdbc.xml



      4. I tried with and without all the properties in my common\deploy\jboss-ejb3-timerservice-mk2.jar\META-INF\jboss-ejb3-timerservice-mk2-jboss-beans.xml


      <persistence xmlns="http://java.sun.com/xml/ns/persistence"   
         <persistence-unit name="timerdb">
                <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                <property name="hibernate.transaction.factory_class" value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory"/>
                <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
                <property name="hibernate.hbm2ddl.auto" value="update"/>


      I am running out of ideas. Any suggestions?


      Thanks in advance.