Skip to Content
author's profile photo
Former Member

Timeout Service in SAP WAS 6.40

Howdy,

I am currently in the process of migrating our enterprise application from Jboss 3.2.6 to SAP WAS 6.40.

In Jboss we have a standard Timer Service and our application class registers as a Listener to the Timer Service listening for notifications at regular intervals and I am trying to implement a similar mechanism in SAP WAS.

Came across a few options

1.To implement the JMX standard Timer mbean as a service and deploy it into SAP WAS so that it is deployed and automatically starteed and then to write a notification listener to this service - Now came across a post that suggested that this is not possible in 6.40 since deployment of custom services is not supported - not sure if it is still possible though

2. Second option is to use the Timeout service in SAP WAS itself but having huge problem in implemnting the listener to this service. First of all i had a problem locating the jar that contained the com.sap.engine.service.timer package, after having doen that <b>i now face the hurdle of finding the file containing the com.sap.engine.frame.container.event package.</b>

Documentation certainly ain't very useful.

Any help from anyone who has attempted to do a similar thing is much appreciated.

Thanks

Dushy

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Oct 05, 2005 at 10:26 PM

    Have you thought about creating a servlet/jsp that has functionality within it to do the timing? If you do this, then you can setup the servlet/jsp to start on deploy. It will then run until it is undeployed.

    I did this with an application that pulls data from the database at a regular interval. It was also there so that if somebody wanted to force the read, then they could go to the jsp directly.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Nathan,

      Thanks for the response. I had a similar suggestion from another person i.e. to use a servlet but to actually register my mBean as opposed to running like a Timer itself.

      In terms of what you did in your application - i am assuming you implemented a thread inside you servlet - would this be correct??

      Thanks

      Dushy

  • author's profile photo
    Former Member
    Oct 06, 2005 at 05:41 AM

    Check out:

    import java.util.Timer;

    import java.util.TimerTask;

    private static Timer timer = new Timer();

    timer.schedule( new JobListingScheduler(),date.getTime(),1000 * 60 * 60 * 24);

    class JobListingScheduler extends TimerTask {

    public void run() {

    }

    }

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Sorry My bad, i have got the servlet loading at startup, didn;t realise that because i couldn;t see the logs from my servlet.

      Anyway still working on registering the mBean.

      Dushy