purging record at server startup from quartz job

View: New views
5 Messages — Rating Filter:   Alert me  

purging record at server startup from quartz job

by Sonali Jambhekar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi all,
I have quartz job that run every 10 sec. and perform some db funtions...My requirement is that, when we redeploy the code, I have to purge a record everytime manually from a table....is there a way in Quartz..like a init method which will purge the record just once when the server start and later the execution of job could carry on as shceduled.

--
thanks,
Sonali Jambhekar


Re: purging record at server startup from quartz job

by BrockHeinz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sonali,

Why not just do the purge in your BootStrap's init action closure?

Brock



On Tue, Jul 8, 2008 at 1:57 PM, Sonali Jambhekar
<sonalijambhekar@...> wrote:

> hi all,
> I have quartz job that run every 10 sec. and perform some db funtions...My
> requirement is that, when we redeploy the code, I have to purge a record
> everytime manually from a table....is there a way in Quartz..like a init
> method which will purge the record just once when the server start and later
> the execution of job could carry on as shceduled.
>
> --
> thanks,
> Sonali Jambhekar
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: purging record at server startup from quartz job

by Sonali Jambhekar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hmm...sounds like a good idea...let me try that...thanks Brock

On Tue, Jul 8, 2008 at 1:10 PM, Brock Heinz <brock.heinz@...> wrote:
Sonali,

Why not just do the purge in your BootStrap's init action closure?

Brock



On Tue, Jul 8, 2008 at 1:57 PM, Sonali Jambhekar
<sonalijambhekar@...> wrote:
> hi all,
> I have quartz job that run every 10 sec. and perform some db funtions...My
> requirement is that, when we redeploy the code, I have to purge a record
> everytime manually from a table....is there a way in Quartz..like a init
> method which will purge the record just once when the server start and later
> the execution of job could carry on as shceduled.
>
> --
> thanks,
> Sonali Jambhekar
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
thanks,
Sonali Jambhekar


Re: purging record at server startup from quartz job

by BrockHeinz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 8, 2008 at 3:15 PM, Sonali Jambhekar
<sonalijambhekar@...> wrote:
> hmm...sounds like a good idea...let me try that...thanks Brock

No problem.

One thing to note regarding the Quartz Plugin.  My experience has
shown that Jobs are not singletons - so you'd have to be careful if
you wanted to maintain state somehow to determine if the Job was
running for its first time.

hth,
Brock


> On Tue, Jul 8, 2008 at 1:10 PM, Brock Heinz <brock.heinz@...> wrote:
>>
>> Sonali,
>>
>> Why not just do the purge in your BootStrap's init action closure?
>>
>> Brock
>>
>>
>>
>> On Tue, Jul 8, 2008 at 1:57 PM, Sonali Jambhekar
>> <sonalijambhekar@...> wrote:
>> > hi all,
>> > I have quartz job that run every 10 sec. and perform some db
>> > funtions...My
>> > requirement is that, when we redeploy the code, I have to purge a record
>> > everytime manually from a table....is there a way in Quartz..like a init
>> > method which will purge the record just once when the server start and
>> > later
>> > the execution of job could carry on as shceduled.
>> >
>> > --
>> > thanks,
>> > Sonali Jambhekar
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> thanks,
> Sonali Jambhekar
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: purging record at server startup from quartz job

by Sonali Jambhekar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thats a good point Brock, though in my case I have the job start after 5 min after server startup so if i put this purging in bootstrap it first purges the record and when my job starts it checks for the record if existss or not...and if not it wll add a new one and then firuther processing will continue....
thanks a lot for ur suggestion. it worked for me.
-Sonali

On Tue, Jul 8, 2008 at 1:19 PM, Brock Heinz <brock.heinz@...> wrote:
On Tue, Jul 8, 2008 at 3:15 PM, Sonali Jambhekar
<sonalijambhekar@...> wrote:
> hmm...sounds like a good idea...let me try that...thanks Brock

No problem.

One thing to note regarding the Quartz Plugin.  My experience has
shown that Jobs are not singletons - so you'd have to be careful if
you wanted to maintain state somehow to determine if the Job was
running for its first time.

hth,
Brock


> On Tue, Jul 8, 2008 at 1:10 PM, Brock Heinz <brock.heinz@...> wrote:
>>
>> Sonali,
>>
>> Why not just do the purge in your BootStrap's init action closure?
>>
>> Brock
>>
>>
>>
>> On Tue, Jul 8, 2008 at 1:57 PM, Sonali Jambhekar
>> <sonalijambhekar@...> wrote:
>> > hi all,
>> > I have quartz job that run every 10 sec. and perform some db
>> > funtions...My
>> > requirement is that, when we redeploy the code, I have to purge a record
>> > everytime manually from a table....is there a way in Quartz..like a init
>> > method which will purge the record just once when the server start and
>> > later
>> > the execution of job could carry on as shceduled.
>> >
>> > --
>> > thanks,
>> > Sonali Jambhekar
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> thanks,
> Sonali Jambhekar
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
thanks,
Sonali Jambhekar

LightInTheBox - Buy quality products at wholesale price