I'm trying to replace an existing logic in our application that makes use of persistent proggramatic timers to non persistent timers due to a recent issue that we encountered. The file system that WAS uses to write the persistent information of the timers was full and the Derby database got restarted in read only mode , making our application not able to trigger the timers post that, we had to restart the server to fix the same.
this is the current piece of code that is used to trigger the programmatic timer
Timer timer = timerService.createTimer(100,eventContextWrapper);
As per the examples quoted in http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html, changed our code to
TimerConfig tC = new TimerConfig(eventContextWrapper, false);
Timer timer = timerService.createSingleActionTimer(100, tC);
but we are facing the below exception
[5/31/17 22:18:23:348 GMT+08:00] 000000bf SystemErr R org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : null vmcid: IBM minor code: 896 completed: No
[5/31/17 22:18:23:348 GMT+08:00] 000000bf SystemErr R at com.ibm.rmi.iiop.CDRReader.read_value(CDRReader.java:771)
[5/31/17 22:18:23:348 GMT+08:00] 000000bf SystemErr R at com.ibm.rmi.iiop.EncoderInputStream.read_value(EncoderInputStream.java:840)
[5/31/17 22:18:23:348 GMT+08:00] 000000bf SystemErr R at com.ibm.ws.ejbcontainer.util.ORBObjectCopierImpl.copy(ORBObjectCopierImpl.java:52)
[5/31/17 22:18:23:348 GMT+08:00] 000000bf SystemErr R at com.ibm.ws.ejbcontainer.util.ObjectUtil.copy(ObjectUtil.java:159)
[5/31/17 22:18:23:349 GMT+08:00] 000000bf SystemErr R at com.ibm.ejs.container.TimerNpImpl.<init>(TimerNpImpl.java:240)
[5/31/17 22:18:23:349 GMT+08:00] 000000bf SystemErr R at com.ibm.ejs.container.TimerNpImpl.<init>(TimerNpImpl.java:276)
[5/31/17 22:18:23:349 GMT+08:00] 000000bf SystemErr R at com.ibm.ws.runtime.component.WASEJBRuntimeImpl.createTimer(WASEJBRuntimeImpl.java:1371)
[5/31/17 22:18:23:349 GMT+08:00] 000000bf SystemErr R at com.ibm.ejs.container.BeanO.createSingleActionTimer(BeanO.java:2551)
com.test.customer.event.EventTimerBean.triggerTimer(EventTimerBean.java:62)
Line 62 is where the createSingleActionTimer is invoked.
Have done some analysis and unable to fix the same. any lead would be helpful..
Eventually found that one of the classes in the EventContextWrapper is not serializable and that's why we were getting the above error. We changed that class to implement serializable and it worked. Still ain't sure , how come it worked when persistent timer was used.