Link to home
Start Free TrialLog in
Avatar of girionis
girionisFlag for Greece

asked on

WLI - Fire a timer when WebLogic starts

Hello, I have a design issue.

I am using WLI 8.1.6 and I want to fire a timer when WebLogic starts. I could do it the traditional way, i.e. write a java.util.Timer, load it at server startup and then have it running ever since. But since WLI provides a timer control to do it I would like to use this. Now my issue is I am not sure what I should use this control with. I am thinking about writing a web service (with a "startup" method) and add a timer control there.

1) Is this a good approach or should I use something else (eg. an EJB)?
2) How can I instruct WebLogic to load up my webservice and call the startup method without user interaction?

Any links/thoughts/personal experience is more than welcome.

Thank you
ASKER CERTIFIED SOLUTION
Avatar of ECollin
ECollin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of girionis

ASKER

Hello Ecollin, this is actually similar to how one of the systems currently works. We have a startup servlet that fires some timers when it is fully loaded by weblogic. At first I was thinking about writing another servlet as well, but then I was actually wondering if it is possible to startup the web service on its own instead of having a startup class to do it. Do you think it's possible?
Avatar of ECollin
ECollin

hi,

it's not possible to startup the web service by its own.
Are you using workshop ?

Emmanuel
Yes I am using workshop. Right so as I can see the only way is to either use a servlet or a startup class.


for starting the web service and the timer ?
Yes.

ok.

You can also use the GlobalApp if using a web application to auto start your ws.

Emmanuel
I think I will go with a startup class. Thanks :)