org.jboss.ejb.txtimer
Interface DatabasePersistencePlugin

All Known Implementing Classes:
GeneralPurposeDatabasePersistencePlugin (src)

public interface DatabasePersistencePlugin

An implementation of of this interface provides database specific JDBC access that is not portable accros RDBMS systems.

Since:
23-Sep-2004

Method Summary
 void clearTimers()
          Clear all persisted timers
 void createTableIfNotExists()
          Create the timers table if it does not exist already
 void deleteTimer(java.lang.String timerId, TimedObjectId (src)  timedObjectId)
          Delete a timer.
 java.lang.String getColumnInfo()
          Get the info column name
 java.lang.String getColumnInitialDate()
          Get the initial date column name
 java.lang.String getColumnInstancePK()
          Get the instance PK column name
 java.lang.String getColumnTargetID()
          Get the target ID column name
 java.lang.String getColumnTimerID()
          Get the timer ID column name
 java.lang.String getColumnTimerInterval()
          Get the timer interval column name
 java.lang.String getTableName()
          Get the timer table name
 void init(MBeanServer (src)  server, ObjectName (src)  dataSource)
          Initialize the plugin
 void insertTimer(java.lang.String timerId, TimedObjectId (src)  timedObjectId, java.util.Date initialExpiration, long intervalDuration, java.io.Serializable info)
          Insert a timer object
 java.util.List selectTimers()
          Select a list of currently persisted timer handles
 

Method Detail

init

public void init(MBeanServer (src)  server,
                 ObjectName (src)  dataSource)
          throws java.sql.SQLException
Initialize the plugin

Throws:
java.sql.SQLException

createTableIfNotExists

public void createTableIfNotExists()
                            throws java.sql.SQLException
Create the timers table if it does not exist already

Throws:
java.sql.SQLException

insertTimer

public void insertTimer(java.lang.String timerId,
                        TimedObjectId (src)  timedObjectId,
                        java.util.Date initialExpiration,
                        long intervalDuration,
                        java.io.Serializable info)
                 throws java.sql.SQLException
Insert a timer object

Throws:
java.sql.SQLException

selectTimers

public java.util.List selectTimers()
                            throws java.sql.SQLException
Select a list of currently persisted timer handles

Returns:
List
Throws:
java.sql.SQLException

deleteTimer

public void deleteTimer(java.lang.String timerId,
                        TimedObjectId (src)  timedObjectId)
                 throws java.sql.SQLException
Delete a timer.

Throws:
java.sql.SQLException

clearTimers

public void clearTimers()
                 throws java.sql.SQLException
Clear all persisted timers

Throws:
java.sql.SQLException

getTableName

public java.lang.String getTableName()
Get the timer table name


getColumnTimerID

public java.lang.String getColumnTimerID()
Get the timer ID column name


getColumnTargetID

public java.lang.String getColumnTargetID()
Get the target ID column name


getColumnInitialDate

public java.lang.String getColumnInitialDate()
Get the initial date column name


getColumnTimerInterval

public java.lang.String getColumnTimerInterval()
Get the timer interval column name


getColumnInstancePK

public java.lang.String getColumnInstancePK()
Get the instance PK column name


getColumnInfo

public java.lang.String getColumnInfo()
Get the info column name