This is more general follow up comment on using JBoss EJB Timer persistence with Oracle.
I am working with JBoss 4.0.2 EJB Timer persistence using GeneralPurposeDatabasePersistencePlugin. We use Oracle 9i. Unfortunately Oracle BLOBs do not work generically. In my experience, when using Oracle BLOBs, you must cast to a specific Oracle BLOB type, rather than using pure JDBC.
To work around this issue, I tried to extend GeneralPurposeDatabasePersistencePlugin and override a few methods to change the column type of INFO to be VARCHAR so I could use an XML form of my INFO objects. That led to a problem with calling the constructor of TimerImpl. All the constructors of TimerImpl are package or private scope, so there is no way to extend that class to make the necessary changes. I also tried directly implementing a new class that implements the Timer interface, only to find out that the DatabasePersistencePolicy casts the results of "List getTimers()" to TimerImpl instead of Timer - thus getting a ClassCast exception.
Currently, I have changed the JBoss type mapping (in standardjbosscmp-jdbc.xml) for a BLOB to a RAW(2000), which is an unsafe workaround because something somewhere may end up over 2000 bytes and blow up. This column MUST be binary since the GeneralPurposeDatabasePersistencePlugin uses ByteArrayInput/OutputStream to serialize and deserialize into that column.
I've got it working now with RAW(2000), except for the other issue I'm posting - zombie timers remaining in the DB after timer.cancel() has been called and the EJB transaction has completed.
Does anyone have a different approach to persistent JBoss EJB Timers with Oracle 9i or higher?