Hi
We plan to use the timer auto-migration feature of glassfish, but it failed, after I check the code I found the "ClassCastException":
[#|2009-02-02T12:27:44.542+0800|INFO|sun-appserver9.1|ShoalLogger|_ThreadID=19;_ThreadName=com.sun.enterprise.ee.cms.impl.common.Router Thread;instance1;|Sending FailureSuspectedSignals to registered Actions. Member:instance1...|#]
[#|2009-02-02T12:27:44.566+0800|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=19;_ThreadName=com.sun.enterprise.ee.cms.impl.common.Router Thread;_RequestID=faebc022-acef-45b5-b14f-c025c8a6d0aa;|Exception in thread "com.sun.enterprise.ee.cms.impl.common.Router Thread" |#]
[#|2009-02-02T12:27:44.578+0800|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=19;_ThreadName=com.sun.enterprise.ee.cms.impl.common.Router Thread;_RequestID=faebc022-acef-45b5-b14f-c025c8a6d0aa;|java.lang.ClassCastException: timer.TimerFailureNotificationAction cannot be cast to com.sun.enterprise.ee.cms.core.FailureSuspectedAction
at com.sun.enterprise.ee.cms.impl.common.Router.notifyFailureSuspectedAction(Router.java:299)
at com.sun.enterprise.ee.cms.impl.common.SignalHandler.analyzeSignal(SignalHandler.java:120)
at com.sun.enterprise.ee.cms.impl.common.SignalHandler.handleSignals(SignalHandler.java:103)
at com.sun.enterprise.ee.cms.impl.common.SignalHandler.run(SignalHandler.java:85)
at java.lang.Thread.run(Thread.java:619)
|#]
I check the source code "Router" expect a "FailureSuspectedAction" but got a "TimerFailureNotificationAction", from the interface description of "FailureSuspectedActionFactory ", "Action" is the return type of "FailureSuspectedActionFactory.produceAction()".
void notifyFailureSuspectedAction(final FailureSuspectedSignal signal) {
FailureSuspectedAction a;
FailureSuspectedSignal fss;
logger.log(Level.INFO, "failuresuspectedsignals.send.member",
new Object[]{signal.getMemberToken()});
synchronized (failureSuspectedAF) {
for (FailureSuspectedActionFactory fsaf : failureSuspectedAF) {
a = (FailureSuspectedAction) fsaf.produceAction();
fss = new FailureSuspectedSignalImpl(signal);
callAction(a, fss);
}
}
}
So is it a bug of glassfish or shoal?
BRs
//Jason