Freitag, 17. September 2010

Changing Glassfish EJB Timer from embedded Derby to Oracle

Glassfish

This is a small tutorial to persist the Glassfish EJB Timer to an Oracle DB instead of the Derby file DB. It's pretty simple.


Add a new Connection Pool for your Oracle Timer schema.

Create a table with the following create table script.
CREATE
    TABLE EJB__TIMER__TBL
    (
        TIMERID VARCHAR(255) NOT NULL,
        BLOB clob,
        INITIALEXPIRATIONRAW number(20),
        SCHEDULE VARCHAR(255),
        INTERVALDURATION number(20),
        OWNERID VARCHAR(255),
        STATE INTEGER,
        LASTEXPIRATIONRAW number(20),
        PKHASHCODE INTEGER,
        CREATIONTIMERAW number(20),
        CONTAINERID number(20),
        PRIMARY KEY (TIMERID)
    );

Then change the JDBC Resource
jdbc/__TimerPool
to your new connection pool.

Donnerstag, 2. September 2010

Spring at a Glance