| From | Sent On | Attachments |
|---|---|---|
| Nathaniel Auvil | Dec 9, 2009 9:21 am | |
| James House | Dec 9, 2009 12:04 pm | |
| Nathaniel Auvil | Dec 9, 2009 12:09 pm | |
| James House | Dec 9, 2009 12:48 pm | |
| James House | Dec 9, 2009 12:50 pm | |
| Nathaniel Auvil | Dec 9, 2009 1:12 pm | |
| James House | Dec 9, 2009 1:47 pm | |
| Nathaniel Auvil | Dec 10, 2009 6:09 am | |
| Nathaniel Auvil | Dec 10, 2009 8:44 am |
| Subject: | Re: Clustering 1.6.6 in Weblogic 10.3 | |
|---|---|---|
| From: | James House (jho...@revolition.net) | |
| Date: | Dec 9, 2009 1:47:23 pm | |
| List: | net.java.dev.quartz.users | |
I'm sorry, I misspoke too quickly regarding the Weblogic Oracle Driver. ;-)
I am (personally - and I know there are others) using WLS with Oracle RAC with the thin driver and XA.
We create two datasources exclusively for Quartz' use - though there's no reason other components couldn't use them, we have chosen to do this.
* One datasource (the non-managed datasource) is setup to use oracle.jdbc.OracleDriver, and the connect URL specifies thin (e.g. "jdbc:oracle:thin:@host....").
* The other datasource (the managed datasource) is setup to use oracle.jdbc.xa.client.OracleXADataSource, and the connect URL specifies thin (e.g. "jdbc:oracle:thin:@host....").
There must be two different datasources when using XA/CMT features of Quartz (regardless of whether it is clustered):
* One that is setup for non-XA connections (refered to as non-Managed - meaning non-manged transactions) which is used by Quartz for its internal work that does not participate with any other resources, nor is used by your application.
* One that is setup for XA connection which is used by Quartz when your application invokes things such as scheduler.scheduleJob() etc. such that the work done by your application using the Quartz API is part of your application's transaction. Thus your application MUST have a tx in progress before invoking methods on the scheduler, or things won't work out right - because Quartz will not begin or commit transactions on such calls - as it is properly leaving that up to your application code to demarcate. Thus the flow you outline in your e-mail below looks correct per what I've just described.
Regarding your original problem description:
/ I see the scheuler start in the log, and it reads my configuration, however it appears that the database is being locked. When i kill the weblogic server, i see my job in the database, but not when the server is up./
This seems very broken. Oracle should not commit the xa transaction when you kill WLS. it should wait for WLS to come back up, and for it's TM to notify it of whether to commit or rollback.
I know that there are very many problems (in general, not specifically with Quartz) when dealing with XA transactions and Oracle RAC. For instance, you can encounter transaction isolation level problems and even commit/rollback problems if all connections acting as part of the XA transaction are not all talking to the very same RAC node. We struggled a lot finding a setup of datasources in Weblogic that would work for XA transactions against RAC. What I outlines above (regarding drivers) is in fact what we have working, but we've also had to do some fancy work with configuring multi-pools consisting of individual pools that only point to one node in the RAC rather than them pointing at the entire RAC). You can now find BEA/Oracle documentation about such setups if you search their docs.
james
Nathaniel Auvil wrote:
hi James thanks for the response.
I guess i am a bit unclear of what the Quartz data sources are for exactly....
I set the properties to use JobStoreCMT as my use case is something like this...
1) get data inputs 2) perform calculations 3) start a transaction 4) update application tables 5) schedule a job to run 6) commit transaction
the quartz config has two datasources defined...
org.quartz.jobStore.dataSource <--- what is this used for in CMT? org.quartz.jobStore.nonManagedTXDataSource <--- used by Quartz to obtain locks for cluster?
if I am following what you are saying....you are saying to create two data sources in Weblogic for these (different from my applications data source) and use the BEA Oracle Driver for them?
I did not think you could use the BEA Oracle driver to connect to Oracle RAC? The documentation says it is not supported. I suppose you could connect to a single instance in the database cluster but that defeats the purpose of having a database cluster. Thoughts?
FYI - The BEA driver is deprecated in 10.3 (http://download.oracle.com/docs/cd/E12840_01/wls/docs103/upgrade/compat.html#wp1128814) and they say it will be removed in the next release.
On Wed, Dec 9, 2009 at 3:50 PM, James House <jho...@revolition.net <mailto:jho...@revolition.net>> wrote:
If you think it is too risky for your whole project to switch to that driver, why not just create a separate datasource, connecting to the same db, but with that driver, and configure only Quartz to use that datasource?
james
James House wrote:
Yes, you can, I do it all the time. You just have to use the Weblogic Oracle Driver.
james
Nathaniel Auvil wrote:
thanks James.
So if we are using Weblogic Server and Oracle RAC, we can not use clustered Quartz?
On Wed, Dec 9, 2009 at 3:05 PM, James House <jho...@revolition.net <mailto:jho...@revolition.net> <mailto:jho...@revolition.net <mailto:jho...@revolition.net>>> wrote:
Sorry, there's no way (that I'm aware of, and I'm quite experienced with WLS and Oracle) to make this work with the Thin Driver.
james
Nathaniel Auvil wrote:
Hi. I am trying to get quartz clustering to work in Weblogic 10.3 with the Oracle Thin Driver.
I am using the
org.quartz.jobStore.driverDelegateClass =
org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate
And i have tried the #org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
I see the scheuler start in the log, and it reads my configuration, however it appears that the database is being locked. When i kill the weblogic server, i see my job in the database, but not when the server is up.
I have changed to the Weblogic Oracle driver and that seems to work fine, however i can not change the whole project over to use the Weblogic Driver at this point as it is too risky.
--------------------------------------------------------------------- To unsubscribe, e-mail: user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net> <mailto:user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net>> For additional commands, e-mail: user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net> <mailto:user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net>>
--------------------------------------------------------------------- To unsubscribe, e-mail: user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net> For additional commands, e-mail: user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net>
--------------------------------------------------------------------- To unsubscribe, e-mail: user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net> For additional commands, e-mail: user...@quartz.dev.java.net <mailto:user...@quartz.dev.java.net>





