users@glassfish.java.net

Re: Managementrules are not working properly-Timer

From: sankara rao bhogi <Sankara.Rao_at_Sun.COM>
Date: Wed, 08 Apr 2009 22:06:04 +0530

glassfish_at_javadesktop.org wrote:
> Thanks for the help.
>
> I have tried with the following pattern
> MM/dd/yyyy/HH:mm:ss
> But it is not working .Please advise me can we try with the pattern suggested by you.
> I would require the event should be fired on particular time.
> Here the event is firing whenever it is deployed.
>
> I will try the pattern given by you and let you know the result.
>

It works properly for me. If you get your configuration right, it would
work. See my management-rule configuration and action being fired
exactly at the configured time.

   <management-rule enabled="true" name="LateMailRule">
          <event level="FINE" record-event="true" type="timer">
              <description>Send an e-mail to notify customers of invoice
due for payment with in the next two days</description>
            <property name="message" value="Latemailrule is called"/>
            <property name="period" value="86400000"/>
            <property name="pattern" value="dd/MM/yyyy/HH:mm:ss"/>
            <property name="datestring" value="08/04/2009/15:52:00"/>
          </event>


[#|2009-04-08T15:52:00.001+0530|INFO|sun-glassfish-comms-server1.5|javax.enterprise.system.stream.out|_ThreadID=15;_ThreadName=Timer-7;|
CacheControlAction :
javax.management.timer.TimerNotification[source=com.sun.appserver.selfmanagement:eventname=timer][type=timer][message=Latemailrule
is called]|#]

regards
sankar

> Thanks
> satish
> [Message sent by forum member 'satishtalluri' (satishtalluri)]
>
> http://forums.java.net/jive/thread.jspa?messageID=341189
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>