ejb@glassfish.java.net

Re: [Fwd: [Fwd: Java EE Tutorial Feedback - Programming Question]]

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Tue, 28 Aug 2007 15:08:16 -0400

Kenneth Saks wrote:

> Ian Evans wrote:
>
>> Any ideas why the user is seeing this behavior with the Timer service?
>
> The EJB Timer Service is not targeted towards very fine-grained
> timeouts, so there's a default minimum timeout interval of 7 ms

Oops, I meant 7s

> defined within Glassfish. That property can be changed via the
> minimum-delivery-interval-in-millis attribute in domain.xml.
>
> --ken
>
>>
>> -ian
>>
>> ------------------------------------------------------------------------
>>
>> Subject:
>> [Fwd: Java EE Tutorial Feedback - Programming Question]
>> From:
>> Eric Jendrock <Eric.Jendrock_at_Sun.COM>
>> Date:
>> Tue, 28 Aug 2007 12:48:59 -0400
>> To:
>> Ian Evans <Ian.Evans_at_sun.com>
>>
>> To:
>> Ian Evans <Ian.Evans_at_sun.com>
>>
>>
>> You want to field this one? Here's a case where a user is taking
>> your basic example, timersession, and is trying to extend/enhance
>> it. (But she's encountering problems.) If you solve the problem,
>> maybe it is worth a look into whether you want to add it as an
>> enhancement to the example?
>>
>> ~Eric
>>
>> ------------------------------------------------------------------------
>>
>> Subject:
>> Java EE Tutorial Feedback - Programming Question
>> From:
>> amitabak_at_gmail.com
>> Date:
>> Tue, 28 Aug 2007 08:50:32 -0700 (PDT)
>> To:
>> j2eetutorial-feedback_at_sun.com
>>
>> To:
>> j2eetutorial-feedback_at_sun.com
>>
>>
>>name: Ami Tabak
>>url: http://java.sun.com/javaee/5/docs/tutorial/doc/Session4.html
>>chapter: SessionBean
>>tutorial_version: EE 5
>>comments: I run the timersession example.
>>As to try a more real life example I then changed the TimerSessionBean so instead of a single event the timer will run a repeatative mode. I did that by changing the code to:
>> Timer timer = timerService.createTimer(0, intervalDuration, "Created new timer");
>>As to follow up on the accuracy of the events I've enhanced the log to:
>>logger.info(System.currentTimeMillis() + ": Timeout occurred");
>>
>>The client doClient method is configured to call the bean with a value of 3000[mSec]
>>
>>To my suprise the events are triggered every 7[sec] rather then 3[sec]
>>
>>1188315664484: Timeout occurred
>>1188315671562: Timeout occurred
>>1188315678578: Timeout occurred
>>1188315685578: Timeout occurred
>>1188315692593: Timeout occurred
>>
>>I've run similar Time mechansims based on MBean infrastructure and it workes perfectly so the issue is not with the hardware / OS / JVM.
>>
>>Any suggestions
>>
>>Best regards
>>
>>Ami Tabak
>>mailfrom: amitabak_at_gmail.com
>>mailsubject: Java EE Tutorial Feedback - Programming Question
>>thanks_url: http://java.sun.com/javaee/5/docs/tutorial/information/auto-reply.html
>>category: javaee
>>Time Stamp: Tue Aug 28 08:42:21 PDT 2007
>>Feedback Page Referer: http://java.sun.com/javaee/5/docs/tutorial/doc/Session4.html
>>
>>-----------------------------------------------------
>>Remote host : 89.1.216.104
>>Remote IP address : 89.1.216.104
>>Remote Agent : Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
>>Script : http://developers.sun.com/jsp_utils/form_mailer.jsp
>>Referring URL : http://developers.sun.com/contact/feedback.jsp?&category=javaee
>>-----------------------------------------------------
>>
>>
>>------------------------------------------------------------------------
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
>>For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>>
>>
>