You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Eric Pugh <ep...@upstate.com> on 2002/05/01 21:08:48 UTC

Quartz Scheduler

Hi all,

I wanted to post my work with Quartz..  Quartz seems very powerful, and I
didn't have much difficulty wrapping it up in a service.

However, I am currently stuck because I can't seem to get MS's JDBC Driver
to successfully work (inside of Turbine) with Quartz's use of BigInt's.
However, Quartz has been developed extensively against MySql and Oracle..
So I am going to table my work for now until I get some more enthusiasm to
wrestle with MS's JDBC driver.

Good Luck, and I hope to see Quartz succesfully integrated in!

Eric

This is what you add to your TR.props:
# Configure Main Scheduler Properties
======================================

scheduler.quartz.org.quartz.scheduler.instanceName = Sched1
scheduler.quartz.org.quartz.scheduler.logger = schedLogger


# Configure Logger(s)
======================================================

scheduler.quartz.org.quartz.logger.schedLogger.class =
org.quartz.impl.Log4jLogger
scheduler.quartz.org.quartz.logger.schedLogger.categoryName = scheduler
scheduler.quartz.org.quartz.logger.tpLogger.class =
org.quartz.impl.Log4jLogger
scheduler.quartz.org.quartz.logger.tpLogger.categoryName =
scheduler.threadPool
scheduler.quartz.org.quartz.logger.jsLogger.class =
org.quartz.impl.Log4jLogger
scheduler.quartz.org.quartz.logger.jsLogger.categoryName =
scheduler.persistence


# Configure ThreadPool
=====================================================

scheduler.quartz.org.quartz.threadPool.class =
org.quartz.simpl.SimpleThreadPool
scheduler.quartz.org.quartz.threadPool.threadCount = 3
scheduler.quartz.org.quartz.threadPool.threadPrio = 4
scheduler.quartz.org.quartz.threadPool.logger = tpLogger

# Configure JobStore
=======================================================

scheduler.quartz.org.quartz.jobStore.class = org.quartz.impl.JDBCJobStore
scheduler.quartz.org.quartz.jobStore.dataSource = myDS
scheduler.quartz.org.quartz.jobStore.tablePrefix = QRTZ_
scheduler.quartz.org.quartz.jobStore.logger = jsLogger


# Configure Datasources
====================================================
scheduler.quartz.org.quartz.dataSource.myDS.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
scheduler.quartz.org.quartz.dataSource.myDS.URL =
jdbc:microsoft:sqlserver://myserver:1433;DatabaseName=kinaseprofiler
scheduler.quartz.org.quartz.dataSource.myDS.user = myuser
scheduler.quartz.org.quartz.dataSource.myDS.password = mypassword
scheduler.quartz.org.quartz.dataSource.myDS.maxConnections = 13

Good luck, and I hope someone else can validate it's working.  I can get it
to run outside of Turbine, but not successfully inside of turbine.

Eric

Re: Quartz Scheduler

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"Eric Pugh" <ep...@upstate.com> writes:

> In addition, I am looking at the T2.1 code base b/c that is what I am in
> production with.  Should I try and submit this code against the T2.2
> codebase or against Fulcrum?

Against Fulcrum would be best.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Bug with redirects in explorer

Posted by Gareth Coltman <ga...@majorband.co.uk>.
Hi all,

I have found an annoying bug in IE that effects turbine (to some degree). I
would be interested in your thoughts.

There has been discussion before on this list on the use of redirects to
after actions to stop users going back and resubmitting or refreshing. The
problem I have found occurs when you attempt to redirect to a new protocol
and port. This is a common thing to do when going from secure to insecure
parts of a site (e.g. after logout).

If one tries to redirect from

https://domain:8081/myapp/secure

to

http://domain:8080/myapp/insecure

IE 5+ will request the resource:

http://domain:8081/myapp/insecure

when it receives the redirect.

What is this madness!???

I don't know whether any problems occur if using default ports for protocols
(80 & 443)... probably not.

The only work around I can think of is to send another redirect after the
first one, this time with a corrected port number.

Any thoughts? Anyone else had a similar problem.

Gareth


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Quartz Scheduler

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Eric Dobbs <er...@dobbse.net> writes:

> On Wednesday, May 1, 2002, at 03:39  PM, Eric Pugh wrote:
>
>> 1) try and continue to support the existinging interfaces (even if
>> some of
>> the code get's nasty)
>> 2) Change the existing interfaces to be more generic so the old
>> stuff and
>> Quartz will work
>> 3) Ignore the old scheduler, and just add my new one in parrale.
>
> +1 for 3 -- more below
>
>
>> In addition, I am looking at the T2.1 code base b/c that is what I am in
>> production with.  Should I try and submit this code against the T2.2
>> codebase or against Fulcrum?
>
> Neither.  The Quartz wrapper should be a component
> rather than a service.  So the wrapper should end up in
> stratum.
>
> For more info about components, have a look at
> o.a.stratum.component.ComponentLoader and also at
> o.a.turbine.Turbine (for T2) to see how ComponentLoader
> is used to load Fulcrum and Torque.  It should be very
> easy to create a QuartzComponent which implements the
> Configurable and Initializable interfaces.

I'm still a bit unclear about how Components and Services play
together, but it appears that Quartz will be used in Maven for
continual integration (Gump-esqe).  Since the Component package has
fewer dependencies, it makes more sense to use that in Maven than
Fulcrum.  Personally, I wouldn't mind also having a Fulcrum Service,
but it seems like the more immediate need is for Component trapings.
crond works fine for me anyhow.  ;)

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Quartz Scheduler

Posted by Eric Pugh <ep...@upstate.com>.
I'm afraid I ran out of steam, and stepped back to a different platform..  I
am currently using Jcrontab, primarily because my needs are pretty
straightforward, basically, all I need is a static list of jobs run at a
specific time.  Quartz was too powerful for what I needed...

I ended up wrapping JCrontab (jcrontab.sf.net) with Wrapper (wrapper.sf.net)
to provide a cron service that runs as an NT service...  I don't mind
sharing this code if anyone needs it...

I didn't want to tackle Stratum, but I should have..  I miss the whole
services/lifecycle architecture under Stratum..  I plan on moving back into
Stratum when this first phase is done.

Eric

-----Original Message-----
From: Warner Onstine [mailto:sw-list@warneronstine.com]
Sent: Wednesday, May 15, 2002 8:14 PM
To: Turbine Developers List
Subject: Re: Quartz Scheduler


Hi Eric,
How goes the battle with getting this working under Stratum. BTW - did
anyone take this ball and put it somewhere in Turbine?

-warner

----- Original Message -----
From: "Eric Pugh" <ep...@upstate.com>
To: "'Turbine Developers List'" <tu...@jakarta.apache.org>
Cc: "James House (E-mail)" <ja...@interobjective.com>
Sent: Wednesday, May 01, 2002 5:43 PM
Subject: RE: Quartz Scheduler


> Eric,
>
> Well, at this point I have Quartz mostly working under T2.1, but I think I
> will try and get Stratum working under T2.1 or maybe 2.2 to get Quartz
> working as a component.  A friend of mine wrote a nice little component
> wrapper around Lucene that seems like it could fit under Straturm very
> easy...
>
> Current Status:
> I am getting some sort of weird error everytime I shutdown Turbine.
> Basically Quartz internally creates some objects to prevent itself from
> being Garbage collected.  Not sure why.  It doesn't really matter to
> anything though.
>
> I have a private method test() in the startup that creates two different
> types of jobs and run's them.
>
> I have zipped up my code at the state that I have it in.
>
> Somethings that are specific to my enviroment is the JDBCStoreNoBlob that
I
> specified in my TR.props.  For people whose JDBC Drivers support BLOB's
> (most!) should use JDBCStore.
>
> Any comments etectera I would love to see..
>
> Eric Pugh
>
> -----Original Message-----
> From: Eric Dobbs [mailto:eric@dobbse.net]
> Sent: Wednesday, May 01, 2002 8:24 PM
> To: Turbine Developers List
> Subject: Re: Quartz Scheduler
>
>
> On Wednesday, May 1, 2002, at 03:39  PM, Eric Pugh wrote:
>
> > 1) try and continue to support the existinging interfaces (even if some
> > of
> > the code get's nasty)
> > 2) Change the existing interfaces to be more generic so the old stuff
> > and
> > Quartz will work
> > 3) Ignore the old scheduler, and just add my new one in parrale.
>
> +1 for 3 -- more below
>
>
> > In addition, I am looking at the T2.1 code base b/c that is what I am in
> > production with.  Should I try and submit this code against the T2.2
> > codebase or against Fulcrum?
>
> Neither.  The Quartz wrapper should be a component
> rather than a service.  So the wrapper should end up in
> stratum.
>
> For more info about components, have a look at
> o.a.stratum.component.ComponentLoader and also at
> o.a.turbine.Turbine (for T2) to see how ComponentLoader
> is used to load Fulcrum and Torque.  It should be very
> easy to create a QuartzComponent which implements the
> Configurable and Initializable interfaces.
>
> > Also, if anyone else is interested in collaborating, please let me
> > know....
>
> I'm interested.
>
>
> -Eric
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Quartz Scheduler

Posted by Warner Onstine <sw...@warneronstine.com>.
Hi Eric,
How goes the battle with getting this working under Stratum. BTW - did
anyone take this ball and put it somewhere in Turbine?

-warner

----- Original Message -----
From: "Eric Pugh" <ep...@upstate.com>
To: "'Turbine Developers List'" <tu...@jakarta.apache.org>
Cc: "James House (E-mail)" <ja...@interobjective.com>
Sent: Wednesday, May 01, 2002 5:43 PM
Subject: RE: Quartz Scheduler


> Eric,
>
> Well, at this point I have Quartz mostly working under T2.1, but I think I
> will try and get Stratum working under T2.1 or maybe 2.2 to get Quartz
> working as a component.  A friend of mine wrote a nice little component
> wrapper around Lucene that seems like it could fit under Straturm very
> easy...
>
> Current Status:
> I am getting some sort of weird error everytime I shutdown Turbine.
> Basically Quartz internally creates some objects to prevent itself from
> being Garbage collected.  Not sure why.  It doesn't really matter to
> anything though.
>
> I have a private method test() in the startup that creates two different
> types of jobs and run's them.
>
> I have zipped up my code at the state that I have it in.
>
> Somethings that are specific to my enviroment is the JDBCStoreNoBlob that
I
> specified in my TR.props.  For people whose JDBC Drivers support BLOB's
> (most!) should use JDBCStore.
>
> Any comments etectera I would love to see..
>
> Eric Pugh
>
> -----Original Message-----
> From: Eric Dobbs [mailto:eric@dobbse.net]
> Sent: Wednesday, May 01, 2002 8:24 PM
> To: Turbine Developers List
> Subject: Re: Quartz Scheduler
>
>
> On Wednesday, May 1, 2002, at 03:39  PM, Eric Pugh wrote:
>
> > 1) try and continue to support the existinging interfaces (even if some
> > of
> > the code get's nasty)
> > 2) Change the existing interfaces to be more generic so the old stuff
> > and
> > Quartz will work
> > 3) Ignore the old scheduler, and just add my new one in parrale.
>
> +1 for 3 -- more below
>
>
> > In addition, I am looking at the T2.1 code base b/c that is what I am in
> > production with.  Should I try and submit this code against the T2.2
> > codebase or against Fulcrum?
>
> Neither.  The Quartz wrapper should be a component
> rather than a service.  So the wrapper should end up in
> stratum.
>
> For more info about components, have a look at
> o.a.stratum.component.ComponentLoader and also at
> o.a.turbine.Turbine (for T2) to see how ComponentLoader
> is used to load Fulcrum and Torque.  It should be very
> easy to create a QuartzComponent which implements the
> Configurable and Initializable interfaces.
>
> > Also, if anyone else is interested in collaborating, please let me
> > know....
>
> I'm interested.
>
>
> -Eric
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Quartz Scheduler

Posted by Eric Pugh <ep...@upstate.com>.
Eric,

Well, at this point I have Quartz mostly working under T2.1, but I think I
will try and get Stratum working under T2.1 or maybe 2.2 to get Quartz
working as a component.  A friend of mine wrote a nice little component
wrapper around Lucene that seems like it could fit under Straturm very
easy...

Current Status:
I am getting some sort of weird error everytime I shutdown Turbine.
Basically Quartz internally creates some objects to prevent itself from
being Garbage collected.  Not sure why.  It doesn't really matter to
anything though.

I have a private method test() in the startup that creates two different
types of jobs and run's them.

I have zipped up my code at the state that I have it in.

Somethings that are specific to my enviroment is the JDBCStoreNoBlob that I
specified in my TR.props.  For people whose JDBC Drivers support BLOB's
(most!) should use JDBCStore.

Any comments etectera I would love to see..

Eric Pugh

-----Original Message-----
From: Eric Dobbs [mailto:eric@dobbse.net]
Sent: Wednesday, May 01, 2002 8:24 PM
To: Turbine Developers List
Subject: Re: Quartz Scheduler


On Wednesday, May 1, 2002, at 03:39  PM, Eric Pugh wrote:

> 1) try and continue to support the existinging interfaces (even if some
> of
> the code get's nasty)
> 2) Change the existing interfaces to be more generic so the old stuff
> and
> Quartz will work
> 3) Ignore the old scheduler, and just add my new one in parrale.

+1 for 3 -- more below


> In addition, I am looking at the T2.1 code base b/c that is what I am in
> production with.  Should I try and submit this code against the T2.2
> codebase or against Fulcrum?

Neither.  The Quartz wrapper should be a component
rather than a service.  So the wrapper should end up in
stratum.

For more info about components, have a look at
o.a.stratum.component.ComponentLoader and also at
o.a.turbine.Turbine (for T2) to see how ComponentLoader
is used to load Fulcrum and Torque.  It should be very
easy to create a QuartzComponent which implements the
Configurable and Initializable interfaces.

> Also, if anyone else is interested in collaborating, please let me
> know....

I'm interested.


-Eric

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

Re: Quartz Scheduler

Posted by Eric Dobbs <er...@dobbse.net>.
On Wednesday, May 1, 2002, at 03:39  PM, Eric Pugh wrote:

> 1) try and continue to support the existinging interfaces (even if some 
> of
> the code get's nasty)
> 2) Change the existing interfaces to be more generic so the old stuff 
> and
> Quartz will work
> 3) Ignore the old scheduler, and just add my new one in parrale.

+1 for 3 -- more below


> In addition, I am looking at the T2.1 code base b/c that is what I am in
> production with.  Should I try and submit this code against the T2.2
> codebase or against Fulcrum?

Neither.  The Quartz wrapper should be a component
rather than a service.  So the wrapper should end up in
stratum.

For more info about components, have a look at
o.a.stratum.component.ComponentLoader and also at
o.a.turbine.Turbine (for T2) to see how ComponentLoader
is used to load Fulcrum and Torque.  It should be very
easy to create a QuartzComponent which implements the
Configurable and Initializable interfaces.

> Also, if anyone else is interested in collaborating, please let me 
> know....

I'm interested.


-Eric

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Quartz Scheduler

Posted by Eric Pugh <ep...@upstate.com>.
Follow up on my nightmare!  It turns out the reason I couldn't get things to
work is that MS JDBC driver doesn't support Blob's, hence the reason I am
constantly getting errors everytime the Quartz code call's getBlob()!

I am patching that, and aside from that MS specific problem, quartz will
rock.  Now, my other question, and I am hoping some of the people with more
experience with Turbine development will chime in.  It seems that the
SchedulerService interface is pretty rigid, mainly requiring Jobentry's
which have very specific values, that don't really map well onto the Quartz
model.  So, I am trying to figure out, should I

1) try and continue to support the existinging interfaces (even if some of
the code get's nasty)
2) Change the existing interfaces to be more generic so the old stuff and
Quartz will work
3) Ignore the old scheduler, and just add my new one in parrale.

In addition, I am looking at the T2.1 code base b/c that is what I am in
production with.  Should I try and submit this code against the T2.2
codebase or against Fulcrum?

Also, if anyone else is interested in collaborating, please let me know....

Thanks,

Eric

-----Original Message-----
From: Eric Pugh [mailto:epugh@upstate.com]
Sent: Wednesday, May 01, 2002 3:09 PM
To: Turbine Developers List (E-mail)
Subject: Quartz Scheduler


Hi all,

I wanted to post my work with Quartz..  Quartz seems very powerful, and I
didn't have much difficulty wrapping it up in a service.

However, I am currently stuck because I can't seem to get MS's JDBC Driver
to successfully work (inside of Turbine) with Quartz's use of BigInt's.
However, Quartz has been developed extensively against MySql and Oracle..
So I am going to table my work for now until I get some more enthusiasm to
wrestle with MS's JDBC driver.

Good Luck, and I hope to see Quartz succesfully integrated in!

Eric

This is what you add to your TR.props:
# Configure Main Scheduler Properties
======================================

scheduler.quartz.org.quartz.scheduler.instanceName = Sched1
scheduler.quartz.org.quartz.scheduler.logger = schedLogger


# Configure Logger(s)
======================================================

scheduler.quartz.org.quartz.logger.schedLogger.class =
org.quartz.impl.Log4jLogger
scheduler.quartz.org.quartz.logger.schedLogger.categoryName = scheduler
scheduler.quartz.org.quartz.logger.tpLogger.class =
org.quartz.impl.Log4jLogger
scheduler.quartz.org.quartz.logger.tpLogger.categoryName =
scheduler.threadPool
scheduler.quartz.org.quartz.logger.jsLogger.class =
org.quartz.impl.Log4jLogger
scheduler.quartz.org.quartz.logger.jsLogger.categoryName =
scheduler.persistence


# Configure ThreadPool
=====================================================

scheduler.quartz.org.quartz.threadPool.class =
org.quartz.simpl.SimpleThreadPool
scheduler.quartz.org.quartz.threadPool.threadCount = 3
scheduler.quartz.org.quartz.threadPool.threadPrio = 4
scheduler.quartz.org.quartz.threadPool.logger = tpLogger

# Configure JobStore
=======================================================

scheduler.quartz.org.quartz.jobStore.class = org.quartz.impl.JDBCJobStore
scheduler.quartz.org.quartz.jobStore.dataSource = myDS
scheduler.quartz.org.quartz.jobStore.tablePrefix = QRTZ_
scheduler.quartz.org.quartz.jobStore.logger = jsLogger


# Configure Datasources
====================================================
scheduler.quartz.org.quartz.dataSource.myDS.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
scheduler.quartz.org.quartz.dataSource.myDS.URL =
jdbc:microsoft:sqlserver://myserver:1433;DatabaseName=kinaseprofiler
scheduler.quartz.org.quartz.dataSource.myDS.user = myuser
scheduler.quartz.org.quartz.dataSource.myDS.password = mypassword
scheduler.quartz.org.quartz.dataSource.myDS.maxConnections = 13

Good luck, and I hope someone else can validate it's working.  I can get it
to run outside of Turbine, but not successfully inside of turbine.

Eric



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>