Hi All,

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? 

TIA,
Vick Fisher


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918530#3918530

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918530


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to