|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport 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 |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.ejb.txtimer.DatabasePersistencePolicyMBean |
OBJECT_NAME |
Fields inherited from interface org.jboss.system.ServiceMBean |
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(String timerId,
TimedObjectId timedObjectId)
Removes the timer from persistent storage. |
String |
getDatabasePersistencePlugin()
|
javax.management.ObjectName |
getDataSource()
|
void |
handleNotification(javax.management.Notification notification,
Object handback)
Expects a notification from the server when it is done with startup |
void |
insertTimer(String timerId,
TimedObjectId timedObjectId,
Date firstEvent,
long intervalDuration,
Serializable info)
Creates the timer in persistent storage. |
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(String dbpPluginClass)
|
void |
setDataSource(javax.management.ObjectName dataSource)
|
void |
startService()
Initializes this service. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
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 |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Constructor Detail |
public DatabasePersistencePolicy()
Method Detail |
public void startService() throws Exception
Exception
public void handleNotification(javax.management.Notification notification, Object handback)
handleNotification
in interface javax.management.NotificationListener
notification
- the notification objecthandback
- the handback object given to the broadcaster upon listener registrationpublic void insertTimer(String timerId, TimedObjectId timedObjectId, Date firstEvent, long intervalDuration, Serializable info)
insertTimer
in interface PersistencePolicy
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(String timerId, TimedObjectId timedObjectId)
deleteTimer
in interface PersistencePolicy
timerId
- The timer idtimedObjectId
- The id of the timed objectpublic List listTimerHandles()
listTimerHandles
in interface PersistencePolicy
public void restoreTimers()
restoreTimers
in interface PersistencePolicy
public void clearTimers()
clearTimers
in interface PersistencePolicy
public void resetAndRestoreTimers() throws SQLException
resetAndRestoreTimers
in interface DatabasePersistencePolicyMBean
SQLException
public javax.management.ObjectName getDataSource()
getDataSource
in interface DatabasePersistencePolicyMBean
public void setDataSource(javax.management.ObjectName dataSource)
setDataSource
in interface DatabasePersistencePolicyMBean
public String getDatabasePersistencePlugin()
getDatabasePersistencePlugin
in interface DatabasePersistencePolicyMBean
public void setDatabasePersistencePlugin(String dbpPluginClass)
setDatabasePersistencePlugin
in interface DatabasePersistencePolicyMBean
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |