[jboss-cvs] JBossAS SVN: r104455 - in trunk: connector/src/main and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 4 15:58:17 EDT 2010
Author: pgier
Date: 2010-05-04 15:58:17 -0400 (Tue, 04 May 2010)
New Revision: 104455
Added:
trunk/connector/src/main/resources/
trunk/connector/src/main/resources/org/
trunk/connector/src/main/resources/org/jboss/
trunk/connector/src/main/resources/org/jboss/resource/
trunk/connector/src/main/resources/org/jboss/resource/adapter/
trunk/connector/src/main/resources/org/jboss/resource/adapter/quartz/
trunk/connector/src/main/resources/org/jboss/resource/adapter/quartz/inflow/
trunk/connector/src/main/resources/org/jboss/resource/adapter/quartz/inflow/quartz.properties
Removed:
trunk/connector/src/resources/quartz-rar/quartz.properties
Modified:
trunk/component-matrix/pom.xml
trunk/connector/src/main/java/org/jboss/resource/adapter/quartz/inflow/QuartzResourceAdapter.java
Log:
[JBAS-7988] Update quartz to 1.8 and remove the automatic update check.
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2010-05-04 18:26:28 UTC (rev 104454)
+++ trunk/component-matrix/pom.xml 2010-05-04 19:58:17 UTC (rev 104455)
@@ -1561,10 +1561,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
</exclusions>
</dependency>
@@ -3056,7 +3052,17 @@
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
- <version>1.7.3</version>
+ <version>1.8.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
Modified: trunk/connector/src/main/java/org/jboss/resource/adapter/quartz/inflow/QuartzResourceAdapter.java
===================================================================
--- trunk/connector/src/main/java/org/jboss/resource/adapter/quartz/inflow/QuartzResourceAdapter.java 2010-05-04 18:26:28 UTC (rev 104454)
+++ trunk/connector/src/main/java/org/jboss/resource/adapter/quartz/inflow/QuartzResourceAdapter.java 2010-05-04 19:58:17 UTC (rev 104455)
@@ -21,20 +21,27 @@
*/
package org.jboss.resource.adapter.quartz.inflow;
-import org.jboss.logging.Logger;
-import org.quartz.*;
-import org.quartz.impl.StdSchedulerFactory;
+import java.io.IOException;
+import java.io.InputStream;
+import javax.resource.ResourceException;
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.BootstrapContext;
import javax.resource.spi.ResourceAdapter;
-import javax.resource.spi.BootstrapContext;
import javax.resource.spi.ResourceAdapterInternalException;
-import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.endpoint.MessageEndpoint;
+import javax.resource.spi.endpoint.MessageEndpointFactory;
import javax.resource.spi.work.WorkManager;
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-import javax.resource.spi.endpoint.MessageEndpoint;
-import javax.resource.ResourceException;
import javax.transaction.xa.XAResource;
+import org.jboss.logging.Logger;
+import org.quartz.CronTrigger;
+import org.quartz.JobDetail;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.StatefulJob;
+import org.quartz.impl.StdSchedulerFactory;
+
/**
* Comment
*
@@ -48,6 +55,8 @@
private static final ThreadLocal holder = new ThreadLocal();
private Scheduler sched;
+
+ public final static String QUARTZ_PROPERTIES_PATH = "org/jboss/resource/adapter/quartz/inflow/quartz.properties";
public static WorkManager getConfigTimeWorkManager() {
return (WorkManager) holder.get();
@@ -55,11 +64,15 @@
public void start(BootstrapContext ctx) throws ResourceAdapterInternalException
{
- log.debug("start quartz!!!");
+ log.debug("Start Quartz scheduler");
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ InputStream quartzPropsStream = cl.getResourceAsStream( QUARTZ_PROPERTIES_PATH );
// First we must get a reference to a scheduler
- SchedulerFactory sf = new StdSchedulerFactory();
+ StdSchedulerFactory sf = new StdSchedulerFactory();
try
{
+ sf.initialize( quartzPropsStream );
+ quartzPropsStream.close();
holder.set(ctx.getWorkManager());
sched = sf.getScheduler();
sched.start();
@@ -68,6 +81,10 @@
{
throw new ResourceAdapterInternalException(e);
}
+ catch (IOException e)
+ {
+ log.warn( "Unable to close quartz properties file: " + e, e );
+ }
finally
{
holder.set(null);
@@ -76,7 +93,7 @@
public void stop()
{
- log.debug("stop");
+ log.debug("Stop Quartz scheduler");
try
{
sched.shutdown(true);
Copied: trunk/connector/src/main/resources/org/jboss/resource/adapter/quartz/inflow/quartz.properties (from rev 104440, trunk/connector/src/resources/quartz-rar/quartz.properties)
===================================================================
--- trunk/connector/src/main/resources/org/jboss/resource/adapter/quartz/inflow/quartz.properties (rev 0)
+++ trunk/connector/src/main/resources/org/jboss/resource/adapter/quartz/inflow/quartz.properties 2010-05-04 19:58:17 UTC (rev 104455)
@@ -0,0 +1,10 @@
+# Quartz configuration properties
+org.quartz.scheduler.instanceName = JBossQuartzScheduler
+
+org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+org.quartz.threadPool.threadCount = 10
+org.quartz.threadPool.threadPriority = 5
+org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
+
+# Don't check for new versions of quartz
+org.quartz.scheduler.skipUpdateCheck = true
Deleted: trunk/connector/src/resources/quartz-rar/quartz.properties
===================================================================
--- trunk/connector/src/resources/quartz-rar/quartz.properties 2010-05-04 18:26:28 UTC (rev 104454)
+++ trunk/connector/src/resources/quartz-rar/quartz.properties 2010-05-04 19:58:17 UTC (rev 104455)
@@ -1,25 +0,0 @@
-## job store
-org.quartz.jobStore.class=org.quartz.simpl.RAMJobStore
-org.quartz.jobStore.misfireThreshold=60000
-#org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT
-#org.quartz.jobStore.dataSource=rarDS
-#org.quartz.jobStore.nonManagedTXDataSource=rarDS
-#org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.HSQLDBDelegate
-#org.quartz.jobStore.tablePrefix=QRTZ_
-# To get it to work with hypersonic
-# FIXME: this doesn't lock the row
-#org.quartz.jobStore.selectWithLockSQL=SELECT * FROM qrtz_locks WHERE lock_name = ?
-
-## datasource setup
-#org.quartz.dataSource.rarDS.jndiURL=/DefaultDS
-#org.quartz.dataSource.rarDS.connectionProvider.class=org.jboss.resource.adapter.quartz.inflow.LazyJNDIConnectionProvider
-
-## from quartz.properties
-org.quartz.scheduler.instanceName=JBossRARQuartzScheduler
-org.quartz.scheduler.rmi.export=false
-org.quartz.scheduler.rmi.proxy=false
-org.quartz.scheduler.wrapJobExecutionInUserTransaction=false
-
-#org.quartz.threadPool.class=org.jboss.resource.adapter.quartz.inflow.JBossQuartzThreadPool
-#org.quartz.threadPool.threadPoolObjectName=jboss.jca:service=MyThreadPool
-
More information about the jboss-cvs-commits
mailing list