}
public static void writeTimers(MarshallerWriteContext context) throws IOException {
ObjectOutputStream stream = context.stream;
TimerManager timerManager = context.wm.getTimerManager();
long timerId = timerManager.internalGetTimerId();
stream.writeLong( timerId );
// need to think on how to fix this
// stream.writeObject( timerManager.getTimerService() );
List<TimerInstance> timers = new ArrayList<TimerInstance>( timerManager.getTimers() );
Collections.sort( timers,
new Comparator<TimerInstance>() {
public int compare(TimerInstance o1,
TimerInstance o2) {
return (int) (o2.getId() - o1.getId());