Methods Summary |
---|
public javax.ejb.TimerService | createTimerService(javax.management.ObjectName containerId, org.jboss.ejb3.timerservice.TimedObjectInvoker invoker)
/* (non-Javadoc)
* @see org.jboss.ejb3.timerservice.TimerServiceFactory#createTimerService(javax.management.ObjectName, org.jboss.ejb3.timerservice.TimedObjectInvoker)
*/
TimerService timerService = null;
try
{
EJBTimerService service = getEJBTimerService();
TimerService delegate = service.createTimerService(containerId, null, invoker);
timerService = new TimerServiceFacade(containerId, delegate);
}
catch (Exception e)
{
//throw new EJBException("Could not create timer service", e);
if (log.isTraceEnabled())
{
log.trace("Unable to initialize timer service", e);
}
else
{
log.trace("Unable to initialize timer service");
}
}
return timerService;
|
protected org.jboss.ejb.txtimer.EJBTimerService | getEJBTimerService()
return (EJBTimerService) MBeanProxyExt.create(EJBTimerService.class, EJBTimerService.OBJECT_NAME, MBeanServerLocator.locateJBoss());
|
public void | removeTimerService(javax.ejb.TimerService timerService)
removeTimerService(((TimerServiceFacade) timerService).getContainerId());
|
protected void | removeTimerService(javax.management.ObjectName containerId)
try
{
EJBTimerService service = getEJBTimerService();
service.removeTimerService(containerId, true);
}
catch (Exception e)
{
//throw new EJBException("Could not remove timer service", e);
if (log.isTraceEnabled())
{
log.trace("Unable to initialize timer service", e);
}
else
{
log.trace("Unable to initialize timer service");
}
}
|
public void | restoreTimerService(javax.ejb.TimerService aTimerService)
if (aTimerService == null)
{
log.warn("TIMER SERVICE IS NOT INSTALLED");
return;
}
TimerServiceFacade timerService = (TimerServiceFacade) aTimerService;
EJBContainer container = timerService.getContainer();
// FIXME: do not assume that a TimedObjectInvoker is an EJBContainer
ClassLoader loader = container.getClassloader();
getEJBTimerService().restoreTimers(timerService.getContainerId(), loader);
|