|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.ejb.txtimer.DatabasePersistencePolicy
This service implements a PersistencePolicy that persistes the timer to a database.
Field Summary |
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
DatabasePersistencePolicy()
|
Method Summary | |
void |
clearTimers()
Delete all persisted timers |
void |
deleteTimer(java.lang.String timerId,
TimedObjectId (src) timedObjectId)
Removes the timer from persistent storage. |
java.lang.String |
getDatabasePersistencePlugin()
|
ObjectName (src) |
getDataSource()
|
void |
handleNotification(Notification (src) notification,
java.lang.Object handback)
Expects a notification from the server when it is done with startup |
void |
insertTimer(java.lang.String timerId,
TimedObjectId (src) timedObjectId,
java.util.Date firstEvent,
long intervalDuration,
java.io.Serializable info)
Creates the timer in persistent storage. |
java.util.List |
listTimerHandles()
Return a List of TimerHandle objects. |
void |
resetAndRestoreTimers()
Re-read the current persistent timers list, clear the db of timers, and restore the timers. |
void |
restoreTimers()
Restore the persistent timers seen during service startup |
void |
setDatabasePersistencePlugin(java.lang.String dbpPluginClass)
|
void |
setDataSource(ObjectName (src) dataSource)
|
void |
startService()
Initializes this service. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop, stopService |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatabasePersistencePolicy()
Method Detail |
public void startService() throws java.lang.Exception
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
public void handleNotification(Notification (src) notification, java.lang.Object handback)
handleNotification
in interface NotificationListener (src)
notification
- the notification objecthandback
- the handback object given to the broadcaster upon listener registrationpublic void insertTimer(java.lang.String timerId, TimedObjectId (src) timedObjectId, java.util.Date firstEvent, long intervalDuration, java.io.Serializable info)
timerId
- The timer idtimedObjectId
- The timed object idfirstEvent
- The point in time at which the first txtimer expiration must occur.intervalDuration
- The number of milliseconds that must elapse between txtimer expiration notifications.info
- A serializable handback object.public void deleteTimer(java.lang.String timerId, TimedObjectId (src) timedObjectId)
timerId
- The timer idpublic java.util.List listTimerHandles()
public void restoreTimers()
public void clearTimers()
public void resetAndRestoreTimers() throws java.sql.SQLException
java.sql.SQLException
public ObjectName (src) getDataSource()
public void setDataSource(ObjectName (src) dataSource)
public java.lang.String getDatabasePersistencePlugin()
public void setDatabasePersistencePlugin(java.lang.String dbpPluginClass)
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |