RE: Job Scheduler pattern
Hi again, sorry if I'm overly persistent, I promise I will drop this issue v. soon ;) Thanks for that link Scott, I couldn't get on to it, I can't get past the login. The LAST question I'd like to ask is, with the client-module tag in orion-ejb-jar.xml, is there a provision for controlling the lifetime of the application? esp restarting if it stops running/falls over? Much appreciated, Justin -Original Message- From: Scott Farquhar [mailto:[EMAIL PROTECTED]] Sent: 29 January 2002 05:45 To: Orion-Interest Subject: Re: Job Scheduler pattern There is an interesting article on DevX regarding timer tasks. http://www.devx.com/premier/mgznarch/Javapro/2002/02feb02/eb0202/eb0202-2.as p It looks like it does what you want. Cheers, Scott Scott Farquhar [EMAIL PROTECTED] Atlassian :: www.atlassian.com Supporting YOUR world Geoff Soutter wrote: Hmm, want us to write it for you? But seriously, there are commercial apps for J2EE scheduling if that's the kind of thing you are after, just use google... Geoff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Justin Crosbie Sent: Saturday, January 26, 2002 2:49 AM To: Orion-Interest Subject: RE: Job Scheduler pattern Yes I have seen that, it is very bare-bones. It doesn't even use the Timer classes. I need to know how to make this robust. Thanks, Justin -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: 25 January 2002 12:04 To: Orion-Interest Subject: Re: Job Scheduler pattern The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
RE: Job Scheduler pattern
Hmm, want us to write it for you? But seriously, there are commercial apps for J2EE scheduling if that's the kind of thing you are after, just use google... Geoff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Justin Crosbie Sent: Saturday, January 26, 2002 2:49 AM To: Orion-Interest Subject: RE: Job Scheduler pattern Yes I have seen that, it is very bare-bones. It doesn't even use the Timer classes. I need to know how to make this robust. Thanks, Justin -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: 25 January 2002 12:04 To: Orion-Interest Subject: Re: Job Scheduler pattern The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
Re: Job Scheduler pattern
There is an interesting article on DevX regarding timer tasks. http://www.devx.com/premier/mgznarch/Javapro/2002/02feb02/eb0202/eb0202-2.asp It looks like it does what you want. Cheers, Scott Scott Farquhar [EMAIL PROTECTED] Atlassian :: www.atlassian.com Supporting YOUR world Geoff Soutter wrote: Hmm, want us to write it for you? But seriously, there are commercial apps for J2EE scheduling if that's the kind of thing you are after, just use google... Geoff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Justin Crosbie Sent: Saturday, January 26, 2002 2:49 AM To: Orion-Interest Subject: RE: Job Scheduler pattern Yes I have seen that, it is very bare-bones. It doesn't even use the Timer classes. I need to know how to make this robust. Thanks, Justin -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: 25 January 2002 12:04 To: Orion-Interest Subject: Re: Job Scheduler pattern The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
RE: Job Scheduler pattern
On Fri, 25 Jan 2002, Paul Knepper wrote: Joseph, Very cool. How do you stop a client-module that auto-started and then restart it? Hmm,the cute answer: any way you like. YOU are the programmer, right? I suppose you could have some kind of query mechanism (listen on a JMS queue? Look for a signal file, or a database record?) ... or use Orion's hot-deploy feature, which won't interrupt your users' sessions if you're a careful developer. (To wit: follow Kevin Duffey's advice to set serialVersionUID or whatever the variable name is. It's early.) Say you deployed the app (which also has ejb and web modules) and later wanted to add another task to the scheduler. Can you start and stop the java client module, so that it would reload the properties file, without affecting the web module? I might have users logged in to the website and I wouldn't want to redeploy everthing and messup any current sessions. Thanks, Paul -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 4:04 AM To: Orion-Interest Subject: Re: Job Scheduler pattern The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
Re: Job Scheduler pattern
The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
Re: Job Scheduler pattern
I'm using a TImer and TimerTasks in my system, and it works perfectly well (even though one is not supposed to use threads in an EJB). What kind of RemoteException are you getting? Cheers, Magnus On fredag, januari 25, 2002, at 10:02 , Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin
RE: Job Scheduler pattern
Yes I have seen that, it is very bare-bones. It doesn't even use the Timer classes. I need to know how to make this robust. Thanks, Justin -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: 25 January 2002 12:04 To: Orion-Interest Subject: Re: Job Scheduler pattern The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
RE: Job Scheduler pattern
It *can* use the Timer classes; it just doesn't. The danger in using Timer, of course, is resoruce starvation if the event being started restarts before the previous execution finishes. On Fri, 25 Jan 2002, Justin Crosbie wrote: Yes I have seen that, it is very bare-bones. It doesn't even use the Timer classes. I need to know how to make this robust. Thanks, Justin -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: 25 January 2002 12:04 To: Orion-Interest Subject: Re: Job Scheduler pattern The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
RE: Job Scheduler pattern
Joseph, Very cool. How do you stop a client-module that auto-started and then restart it? Say you deployed the app (which also has ejb and web modules) and later wanted to add another task to the scheduler. Can you start and stop the java client module, so that it would reload the properties file, without affecting the web module? I might have users logged in to the website and I wouldn't want to redeploy everthing and messup any current sessions. Thanks, Paul -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 4:04 AM To: Orion-Interest Subject: Re: Job Scheduler pattern The www.orionsupport.com site has a sample scheduler that can easily be converted to do something like this. On Fri, 25 Jan 2002, Justin Crosbie wrote: Hi, I'm not sure if I've asked this before, or if I should be asking on a general EJB list. I'd like to implement a job scheduler in J2EE. This would shcedule the execution of EJB methods at a specified time in the future. It would have to be persistent, and jobsd would be rescheduled upon appserver restart. Is it as simple as using the Timer and TimerTask in java.util to implement an app that is started with the client-module tag? Does it matter as far as Orion goes whether I use a java.util.Timer as a daemon or not? What can I do if the app, or the Timer object dies at any stage? I've had problems where after some time something goes wrong I get a strange Remote Exception, and the only solution is to restart the VM. What might cause this? Any opinions on this? How do I make this solution robust is what I am asking. Thanks for any help, Justin --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant