code: @Transactional
  	public List<DeferredEvent> getDeferredEvents() {
  		if (log.isDebugEnabled()) {
  			Query query = m_entityManager.createNamedQuery("DeferredEventsDebug");
  			@SuppressWarnings("unchecked")
  			List<DeferredEvent> result = query.getResultList();
  			log.debug("#found {} deferred events",result.size());
  			for (DeferredEvent deferredEvent:result) {
  				log.debug("#deferred event: {} fire: {} now: {} created: {}",deferredEvent.getEventType(), deferredEvent.getFire(),new Date().getTime(),deferredEvent.getCreated());
  			}
  		}
  		long now = new Date().getTime();
  		Query query = m_entityManager.createNamedQuery("DeferredEvents").setParameter("rightNow", now);
  		@SuppressWarnings("unchecked")
  		List<DeferredEvent> result = query.getResultList();
  		log.debug("found {} deferred events",result.size());
  		return result;
  	}
docs: /* (non-Javadoc)
  @see nz.co.senanque.workflow.WorkflowDAO#getDeferredEvents()