users@glassfish.java.net

Re: ejb3 Timer Serializable

From: <glassfish_at_javadesktop.org>
Date: Mon, 10 Aug 2009 11:26:24 PDT

Why is the timeout method even exposed through the remote interface? The timeout method is a callback from the container to the bean instance. It plays no role from the perspective of a session bean client so it shouldn't be on an interface.

The EJB spec actually prohibits the passing of timers through the remote tier. As for the Timer object itself, it is a special container-provided object that is not guaranteed to be directly serializable. It can be converted to a serializable TimerHandle via Timer.getTimerHandle().
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=359772