[jboss-svn-commits] JBL Code SVN: r27131 - in labs/jbossesb/branches/JBESB_4_4_GA_CP/product: services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm and 7 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 25 10:46:52 EDT 2009
Author: kevin.conner at jboss.com
Date: 2009-06-25 10:46:50 -0400 (Thu, 25 Jun 2009)
New Revision: 27131
Added:
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-quartz.properties
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql
Removed:
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql
Modified:
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/docs/AdministrationGuide.odt
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbm-queue-service.xml
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbmq-queue-service.xml
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-service.xml
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm.cfg.xml
Log:
Add support for JMS message service and JMS/quartz scheduler service: JBESB-2640
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/docs/AdministrationGuide.odt
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration)
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,179 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration;
-
-import java.io.Serializable;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.log4j.Logger;
-import org.jbpm.JbpmContext;
-import org.jbpm.JbpmException;
-import org.jbpm.db.JobSession;
-import org.jbpm.job.Job;
-import org.jbpm.job.Timer;
-
-/**
- * Abstract JMS service code based on the jBPM implementations.
- *
- * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public abstract class AbstractJmsJobService implements Serializable {
- /**
- * Serial Version UID for this class.
- */
- private static final long serialVersionUID = 8511949684016059912L;
-
- private static final String JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME = "JMS_JBOSS_SCHEDULED_DELIVERY" ;
-
- protected final Logger log = Logger.getLogger(getClass()) ;
-
- JobSession jobSession ;
- Connection connection ;
- Session session ;
- Destination destination ;
- MessageProducer messageProducer ;
- boolean isCommitEnabled ;
-
- public AbstractJmsJobService(final JbpmContext jbpmContext, Connection connection, Destination destination, boolean isCommitEnabled) throws JMSException {
- this.jobSession = jbpmContext.getJobSession();
-
- this.connection = connection;
- this.destination = destination;
- this.isCommitEnabled = isCommitEnabled;
- /*
- * If the connection supports XA, the session will always take part in the global transaction.
- * Otherwise the first parameter specifies whether message productions and consumptions
- * are part of a single transaction (TRUE) or performed immediately (FALSE).
- * Messages are never meant to be received before the database transaction commits,
- * hence the transacted is preferable.
- */
- session = connection.createSession(true, Session.SESSION_TRANSACTED);
- }
-
- protected void sendTimer(final Timer timer) {
- send(timer, true) ;
- }
-
- protected void sendJob(final Job job) {
- send(job, false) ;
- }
-
- private void send(final Job job, final boolean timer) {
- final String type = timer ? " timer " : " job " ;
- if (log.isDebugEnabled()) {
- log.debug("Sending" + type + job.getId()) ;
- }
- jobSession.saveJob(job);
- try {
- Message message = session.createMessage();
- if (job.getToken()!=null) {
- message.setLongProperty("tokenId", job.getToken().getId());
- }
- if (job.getProcessInstance()!=null) {
- message.setLongProperty("processInstanceId", job.getProcessInstance().getId());
- }
- if (job.getTaskInstance()!=null) {
- message.setLongProperty("taskInstanceId", job.getTaskInstance().getId());
- }
- if (timer) {
- message.setLongProperty("timerId", job.getId());
- message.setLongProperty(JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, new Long(job.getDueDate().getTime())) ;
- } else {
- message.setLongProperty("jobId", job.getId());
- }
- getMessageProducer().send(message);
- if (log.isDebugEnabled()) {
- log.debug("Sent" + type + job.getId()) ;
- }
- } catch (JMSException e) {
- throw new JbpmException("couldn't send jms message", e);
- }
- }
-
- public void close() {
- JbpmException exception = null;
-
- if (messageProducer!=null) {
- try {
- messageProducer.close();
- } catch (Exception e) {
- // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
- exception = new JbpmException("couldn't close message producer", e);
- }
- }
-
- if (session!=null) {
- if (isCommitEnabled) {
- try {
- session.commit();
- } catch (Exception e) {
- if (exception==null) {
- exception = new JbpmException("couldn't commit JMS session", e);
- }
- }
- }
-
- try {
- session.close();
- } catch (Exception e) {
- if (exception==null) {
- exception = new JbpmException("couldn't close JMS session", e);
- }
- }
- }
-
- if (connection!=null) {
- try {
- connection.close();
- } catch (Exception e) {
- if (exception==null) {
- exception = new JbpmException("couldn't close JMS connection", e);
- }
- }
- }
-
- if (exception!=null) {
- throw exception;
- }
- }
-
- public Session getSession() {
- return session;
- }
-
- public JobSession getJobSession() {
- return jobSession;
- }
-
- protected MessageProducer getMessageProducer() throws JMSException {
- if (messageProducer==null) {
- messageProducer = session.createProducer(destination);
- }
- return messageProducer;
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,240 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration;
+
+import java.io.Serializable;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+
+import org.apache.log4j.Logger;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
+import org.jbpm.db.JobSession;
+import org.jbpm.job.Job;
+import org.jbpm.job.Timer;
+
+/**
+ * Abstract JMS service code based on the jBPM implementations.
+ *
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public abstract class AbstractJmsJobService implements Serializable {
+ /**
+ * Serial Version UID for this class.
+ */
+ private static final long serialVersionUID = 8511949684016059912L;
+
+ /**
+ * Name of the JBoss Messaging property which drives scheduled delivery.
+ */
+ private static final String JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME = "JMS_JBOSS_SCHEDULED_DELIVERY" ;
+
+ /**
+ * The logger for this class.
+ */
+ protected final Logger log = Logger.getLogger(getClass()) ;
+
+ /**
+ * Job session associated with this context.
+ */
+ JobSession jobSession ;
+ /**
+ * JMS connection for delivery.
+ */
+ Connection connection ;
+ /**
+ * JMS session for delivery.
+ */
+ Session session ;
+ /**
+ * JMS destination for delivery.
+ */
+ Destination destination ;
+ /**
+ * JMS message producer for delivery.
+ */
+ MessageProducer messageProducer ;
+ /**
+ * Flag indicating that commit should be invoked.
+ */
+ boolean isCommitEnabled ;
+
+ /**
+ * Construct the base JMS job service.
+ * @param jbpmContext The current jBPM context.
+ * @param connection The associated JMS connection.
+ * @param destination The JMS destination for jobs.
+ * @param isCommitEnabled true if commit should be invoked, false otherwise.
+ * @throws JMSException For errors in constructing the JMS session.
+ */
+ public AbstractJmsJobService(final JbpmContext jbpmContext, Connection connection, Destination destination, boolean isCommitEnabled) throws JMSException {
+ this.jobSession = jbpmContext.getJobSession();
+
+ this.connection = connection;
+ this.destination = destination;
+ this.isCommitEnabled = isCommitEnabled;
+ /*
+ * If the connection supports XA, the session will always take part in the global transaction.
+ * Otherwise the first parameter specifies whether message productions and consumptions
+ * are part of a single transaction (TRUE) or performed immediately (FALSE).
+ * Messages are never meant to be received before the database transaction commits,
+ * hence the transacted is preferable.
+ */
+ session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ }
+
+ /**
+ * Send the timer to the job executor.
+ * @param timer The timer to send.
+ */
+ protected void sendTimer(final Timer timer) {
+ send(timer, true) ;
+ }
+
+ /**
+ * Send the job to the job executor.
+ * @param job The job to send.
+ */
+ protected void sendJob(final Job job) {
+ send(job, false) ;
+ }
+
+ /**
+ * Send the job to the job executor.
+ * @param job The job to send.
+ * @param timer true if a timer, false if a job.
+ */
+ private void send(final Job job, final boolean timer) {
+ final String type = timer ? " timer " : " job " ;
+ if (log.isDebugEnabled()) {
+ log.debug("Sending" + type + job.getId()) ;
+ }
+ jobSession.saveJob(job);
+ try {
+ Message message = session.createMessage();
+ if (job.getToken()!=null) {
+ message.setLongProperty("tokenId", job.getToken().getId());
+ }
+ if (job.getProcessInstance()!=null) {
+ message.setLongProperty("processInstanceId", job.getProcessInstance().getId());
+ }
+ if (job.getTaskInstance()!=null) {
+ message.setLongProperty("taskInstanceId", job.getTaskInstance().getId());
+ }
+ if (timer) {
+ message.setLongProperty("timerId", job.getId());
+ message.setLongProperty(JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, new Long(job.getDueDate().getTime())) ;
+ } else {
+ message.setLongProperty("jobId", job.getId());
+ }
+ getMessageProducer().send(message);
+ if (log.isDebugEnabled()) {
+ log.debug("Sent" + type + job.getId()) ;
+ }
+ } catch (JMSException e) {
+ throw new JbpmException("couldn't send jms message", e);
+ }
+ }
+
+ /**
+ * Cloase the job service.
+ */
+ public void close() {
+ JbpmException exception = null;
+
+ if (messageProducer!=null) {
+ try {
+ messageProducer.close();
+ } catch (Exception e) {
+ // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
+ exception = new JbpmException("couldn't close message producer", e);
+ }
+ }
+
+ if (session!=null) {
+ if (isCommitEnabled) {
+ try {
+ session.commit();
+ } catch (Exception e) {
+ if (exception==null) {
+ exception = new JbpmException("couldn't commit JMS session", e);
+ }
+ }
+ }
+
+ try {
+ session.close();
+ } catch (Exception e) {
+ if (exception==null) {
+ exception = new JbpmException("couldn't close JMS session", e);
+ }
+ }
+ }
+
+ if (connection!=null) {
+ try {
+ connection.close();
+ } catch (Exception e) {
+ if (exception==null) {
+ exception = new JbpmException("couldn't close JMS connection", e);
+ }
+ }
+ }
+
+ if (exception!=null) {
+ throw exception;
+ }
+ }
+
+ /**
+ * Get the JMS session associated with this job service.
+ * @return The JMS session.
+ */
+ public Session getSession() {
+ return session;
+ }
+
+ /**
+ * Get the job session associated with this job service.
+ * @return The job session.
+ */
+ public JobSession getJobSession() {
+ return jobSession;
+ }
+
+ /**
+ * Get the associated JMS message producer.
+ * @return The JMS message producer.
+ * @throws JMSException for errors during construction of the JMS message producer.
+ */
+ protected MessageProducer getMessageProducer() throws JMSException {
+ if (messageProducer==null) {
+ messageProducer = session.createProducer(destination);
+ }
+ return messageProducer;
+ }
+}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command)
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,163 +0,0 @@
-package org.jboss.soa.esb.services.jbpm.integration.command;
-
-import java.io.Serializable;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.log4j.Logger;
-import org.hibernate.StaleStateException;
-import org.jboss.soa.esb.common.TransactionStrategy;
-import org.jboss.soa.esb.common.TransactionStrategyException;
-import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageService;
-import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageServiceFactory;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.JbpmException;
-import org.jbpm.command.Command;
-import org.jbpm.persistence.JbpmPersistenceException;
-import org.jbpm.svc.Services;
-
-/**
- * Based on the jBPM enterprise code, this abstract base class handles most of the
- * processing required by job/command executors.
- *
- * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
- */
-abstract class AbstractMessageListener implements MessageListener
-{
- protected final Logger log = Logger.getLogger(getClass()) ;
-
- public void onMessage(final Message message)
- {
- if (log.isDebugEnabled())
- {
- log.debug("Processing message " + message) ;
- }
- try
- {
- final JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
- try
- {
- // extract command from message
- Command command = extractCommand(message);
- if (log.isDebugEnabled())
- {
- log.debug("Extracted command " + command) ;
- }
- if (command == null)
- {
- discard(jbpmContext, message);
- return;
- }
- final Object result = command.execute(jbpmContext);
- // send a response back if a "reply to" destination is set
- final Destination replyTo = message.getJMSReplyTo();
- if (replyTo != null && (result instanceof Serializable || result == null))
- {
- sendResult(jbpmContext, (Serializable)result, replyTo, message.getJMSMessageID());
- }
- if (log.isDebugEnabled())
- {
- log.debug("Executed command " + command) ;
- }
- jbpmContext.getSession().flush() ;
- }
- finally
- {
- jbpmContext.close() ;
- }
- }
- catch (final StaleStateException sse)
- {
- if (log.isDebugEnabled())
- {
- log.debug("Stale state raised, rolling back transaction") ;
- }
- rollback(sse) ;
- }
- catch (final JbpmPersistenceException jpe)
- {
- if (!Services.isCausedByStaleState(jpe))
- {
- throw jpe ;
- }
- if (log.isDebugEnabled())
- {
- log.debug("Stale state raised, rolling back transaction") ;
- }
- rollback(jpe) ;
- }
- catch (final JbpmException je)
- {
- throw je ;
- }
- catch (final Exception ex)
- {
- throw new JbpmException("could not process message " + message, ex);
- }
- }
-
- protected abstract Command extractCommand(Message message)
- throws JMSException ;
-
- private void discard(final JbpmContext jbpmContext, final Message message)
- throws JMSException
- {
- final Services services = jbpmContext.getServices();
- final JmsMessageServiceFactory messageServiceFactory = (JmsMessageServiceFactory) services.getServiceFactory(Services.SERVICENAME_MESSAGE);
- final Destination destination = messageServiceFactory.getDLQDestination();
-
- final JmsMessageService messageService = (JmsMessageService)services.getMessageService();
- final Session session = messageService.getSession();
- final MessageProducer producer = session.createProducer(destination);
- try {
- producer.send(message);
- }
- finally {
- producer.close();
- }
- }
-
- private void sendResult(final JbpmContext jbpmContext, final Serializable result, final Destination destination, final String correlationId)
- throws JMSException
- {
- if (log.isDebugEnabled())
- {
- log.debug("sending result " + result + " to " + destination);
- }
- final Services services = jbpmContext.getServices();
-
- final JmsMessageService messageService = (JmsMessageService) services.getMessageService();
- final Session session = messageService.getSession();
- final MessageProducer producer = session.createProducer(destination);
- try
- {
- Message resultMessage = session.createObjectMessage(result);
- resultMessage.setJMSCorrelationID(correlationId);
- producer.send(resultMessage);
- } finally {
- producer.close();
- }
- }
-
- private void rollback(final RuntimeException re)
- {
- try
- {
- TransactionStrategy.getTransactionStrategy(true).rollbackOnly() ;
- }
- catch (final TransactionStrategyException tse)
- {
- if (log.isDebugEnabled())
- {
- log.debug("Failed to rollback transaction, throwing original", tse) ;
- }
- throw re ;
- }
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/AbstractMessageListener.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,194 @@
+package org.jboss.soa.esb.services.jbpm.integration.command;
+
+import java.io.Serializable;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+
+import org.apache.log4j.Logger;
+import org.hibernate.StaleStateException;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageService;
+import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageServiceFactory;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
+import org.jbpm.command.Command;
+import org.jbpm.persistence.JbpmPersistenceException;
+import org.jbpm.svc.Services;
+
+/**
+ * Based on the jBPM enterprise code, this abstract base class handles most of the
+ * processing required by job/command executors.
+ *
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+abstract class AbstractMessageListener implements MessageListener
+{
+ /**
+ * The logger for this class.
+ */
+ protected final Logger log = Logger.getLogger(getClass()) ;
+
+ /**
+ * Handle the delivery of a job message.
+ * @param message the JMS message containing the job.
+ */
+ public void onMessage(final Message message)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Processing message " + message) ;
+ }
+ try
+ {
+ final JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
+ try
+ {
+ // extract command from message
+ Command command = extractCommand(message);
+ if (log.isDebugEnabled())
+ {
+ log.debug("Extracted command " + command) ;
+ }
+ if (command == null)
+ {
+ discard(jbpmContext, message);
+ return;
+ }
+ final Object result = command.execute(jbpmContext);
+ // send a response back if a "reply to" destination is set
+ final Destination replyTo = message.getJMSReplyTo();
+ if (replyTo != null && (result instanceof Serializable || result == null))
+ {
+ sendResult(jbpmContext, (Serializable)result, replyTo, message.getJMSMessageID());
+ }
+ if (log.isDebugEnabled())
+ {
+ log.debug("Executed command " + command) ;
+ }
+ jbpmContext.getSession().flush() ;
+ }
+ finally
+ {
+ jbpmContext.close() ;
+ }
+ }
+ catch (final StaleStateException sse)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Stale state raised, rolling back transaction") ;
+ }
+ rollback(sse) ;
+ }
+ catch (final JbpmPersistenceException jpe)
+ {
+ if (!Services.isCausedByStaleState(jpe))
+ {
+ throw jpe ;
+ }
+ if (log.isDebugEnabled())
+ {
+ log.debug("Stale state raised, rolling back transaction") ;
+ }
+ rollback(jpe) ;
+ }
+ catch (final JbpmException je)
+ {
+ throw je ;
+ }
+ catch (final Exception ex)
+ {
+ throw new JbpmException("could not process message " + message, ex);
+ }
+ }
+
+ /**
+ * Extract a jBPM command from the message.
+ * @param message The JMS message.
+ * @return The jBPM command.
+ * @throws JMSException for errors during extraction.
+ */
+ protected abstract Command extractCommand(Message message)
+ throws JMSException ;
+
+ /**
+ * Discard the message by sending to a specified DLQ.
+ * @param jbpmContext The current jBPM context.
+ * @param message The message to discard.
+ * @throws JMSException For errors during JMS delivery.
+ */
+ private void discard(final JbpmContext jbpmContext, final Message message)
+ throws JMSException
+ {
+ final Services services = jbpmContext.getServices();
+ final JmsMessageServiceFactory messageServiceFactory = (JmsMessageServiceFactory) services.getServiceFactory(Services.SERVICENAME_MESSAGE);
+ final Destination destination = messageServiceFactory.getDLQDestination();
+
+ final JmsMessageService messageService = (JmsMessageService)services.getMessageService();
+ final Session session = messageService.getSession();
+ final MessageProducer producer = session.createProducer(destination);
+ try {
+ producer.send(message);
+ }
+ finally {
+ producer.close();
+ }
+ }
+
+ /**
+ * Send a result to a specified destination.
+ * @param jbpmContext The current jBPM context.
+ * @param result The serializable result.
+ * @param destination The destination for the message.
+ * @param correlationId The associated correlation ID.
+ * @throws JMSException For errors during JMS delivery.
+ */
+ private void sendResult(final JbpmContext jbpmContext, final Serializable result, final Destination destination, final String correlationId)
+ throws JMSException
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("sending result " + result + " to " + destination);
+ }
+ final Services services = jbpmContext.getServices();
+
+ final JmsMessageService messageService = (JmsMessageService) services.getMessageService();
+ final Session session = messageService.getSession();
+ final MessageProducer producer = session.createProducer(destination);
+ try
+ {
+ Message resultMessage = session.createObjectMessage(result);
+ resultMessage.setJMSCorrelationID(correlationId);
+ producer.send(resultMessage);
+ } finally {
+ producer.close();
+ }
+ }
+
+ /**
+ * Rollback the encompassing JTA transaction.
+ * @param re The original exception prompting the rollback, thrown should rollback fail.
+ */
+ private void rollback(final RuntimeException re)
+ {
+ try
+ {
+ TransactionStrategy.getTransactionStrategy(true).rollbackOnly() ;
+ }
+ catch (final TransactionStrategyException tse)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Failed to rollback transaction, throwing original", tse) ;
+ }
+ throw re ;
+ }
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,43 +0,0 @@
-package org.jboss.soa.esb.services.jbpm.integration.command;
-
-import java.io.Serializable;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.ObjectMessage;
-
-import org.jbpm.command.Command;
-
-/**
- * Based on the jBPM enterprise code, this class handles specialisation
- * associated with the command executor.
- *
- * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class CommandListener extends AbstractMessageListener
-{
- protected Command extractCommand(Message message)
- throws JMSException
- {
- Command command = null;
- if (message instanceof ObjectMessage)
- {
- log.debug("deserializing command from jms message...");
- ObjectMessage objectMessage = (ObjectMessage)message;
- Serializable object = objectMessage.getObject();
- if (object instanceof Command)
- {
- command = (Command)object;
- }
- else
- {
- log.warn("ignoring object message cause it isn't a command '" + object + "'" + (object != null ? " (" + object.getClass().getName() + ")" : ""));
- }
- }
- else
- {
- log.warn("ignoring message '" + message + "' cause it isn't an ObjectMessage (" + message.getClass().getName() + ")");
- }
- return command;
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/CommandListener.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,48 @@
+package org.jboss.soa.esb.services.jbpm.integration.command;
+
+import java.io.Serializable;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.ObjectMessage;
+
+import org.jbpm.command.Command;
+
+/**
+ * Based on the jBPM enterprise code, this class handles specialisation
+ * associated with the command executor.
+ *
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class CommandListener extends AbstractMessageListener
+{
+ /**
+ * Extract a serialized jBPM command object from the message.
+ * @param message The message containing the command object.
+ * @throws JMSException For errors during extraction.
+ */
+ protected Command extractCommand(Message message)
+ throws JMSException
+ {
+ Command command = null;
+ if (message instanceof ObjectMessage)
+ {
+ log.debug("deserializing command from jms message...");
+ ObjectMessage objectMessage = (ObjectMessage)message;
+ Serializable object = objectMessage.getObject();
+ if (object instanceof Command)
+ {
+ command = (Command)object;
+ }
+ else
+ {
+ log.warn("ignoring object message cause it isn't a command '" + object + "'" + (object != null ? " (" + object.getClass().getName() + ")" : ""));
+ }
+ }
+ else
+ {
+ log.warn("ignoring message '" + message + "' cause it isn't an ObjectMessage (" + message.getClass().getName() + ")");
+ }
+ return command;
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,45 +0,0 @@
-package org.jboss.soa.esb.services.jbpm.integration.command;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.jboss.soa.esb.services.jbpm.integration.job.ExecuteJobCommand;
-import org.jboss.soa.esb.services.jbpm.integration.job.ExecuteTimerCommand;
-import org.jbpm.command.Command;
-
-/**
- * Based on the jBPM enterprise code, this class handles specialisation
- * associated with job and timer executor.
- *
- * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class JobListener extends AbstractMessageListener
-{
- protected Command extractCommand(Message message)
- throws JMSException
- {
- Command command = null;
- // checking for availability of the jobId property
- if (log.isDebugEnabled()) {
- log.debug("getting job id from jms message...");
- }
- Long jobId = (Long) message.getObjectProperty("jobId");
- if (jobId != null) {
- if (log.isDebugEnabled()) {
- log.debug("retrieved jobId '"+jobId+"' via jms message");
- }
- command = new ExecuteJobCommand(jobId.longValue());
- } else {
- Long timerId = (Long) message.getObjectProperty("timerId");
- if (timerId != null) {
- if (log.isDebugEnabled()) {
- log.debug("retrieved timerId '"+timerId+"' via jms message");
- }
- command = new ExecuteTimerCommand(timerId.longValue());
- } else {
- log.warn("ignoring message '"+message+"' cause it doesn't have property jobId");
- }
- }
- return command;
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/command/JobListener.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,50 @@
+package org.jboss.soa.esb.services.jbpm.integration.command;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+
+import org.jboss.soa.esb.services.jbpm.integration.job.ExecuteJobCommand;
+import org.jboss.soa.esb.services.jbpm.integration.job.ExecuteTimerCommand;
+import org.jbpm.command.Command;
+
+/**
+ * Based on the jBPM enterprise code, this class handles specialisation
+ * associated with job and timer executor.
+ *
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JobListener extends AbstractMessageListener
+{
+ /**
+ * Extract a job or timer reference from the message.
+ * @param message The message containing the job or timer reference.
+ * @throws JMSException For errors during extraction.
+ */
+ protected Command extractCommand(Message message)
+ throws JMSException
+ {
+ Command command = null;
+ // checking for availability of the jobId property
+ if (log.isDebugEnabled()) {
+ log.debug("getting job id from jms message...");
+ }
+ Long jobId = (Long) message.getObjectProperty("jobId");
+ if (jobId != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("retrieved jobId '"+jobId+"' via jms message");
+ }
+ command = new ExecuteJobCommand(jobId.longValue());
+ } else {
+ Long timerId = (Long) message.getObjectProperty("timerId");
+ if (timerId != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("retrieved timerId '"+timerId+"' via jms message");
+ }
+ command = new ExecuteTimerCommand(timerId.longValue());
+ } else {
+ log.warn("ignoring message '"+message+"' cause it doesn't have property jobId");
+ }
+ }
+ return command;
+ }
+}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job)
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,170 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.job;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageService;
-import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageServiceFactory;
-import org.jboss.soa.esb.services.jbpm.integration.msg.RetryExecutor;
-import org.jbpm.JbpmContext;
-import org.jbpm.command.Command;
-import org.jbpm.db.JobSession;
-import org.jbpm.job.Job;
-import org.jbpm.svc.Services;
-
-/**
- * Individual job processing command.
- * @author Alejandro Guizar
- */
-public class ExecuteJobCommand implements Command {
-
- private final long jobId;
-
- private static final long serialVersionUID = 1L;
-
- public ExecuteJobCommand(long jobId) {
- this.jobId = jobId;
- }
-
- public Object execute(JbpmContext jbpmContext) throws Exception {
- JobSession jobSession = jbpmContext.getJobSession();
- Job job = jobSession.getJob(jobId);
- if (job == null) {
- if (log.isDebugEnabled()) {
- log.debug("job " + jobId + " was deleted");
- }
- return null;
- }
- String lockOwner = job.getLockOwner();
- if (lockOwner != null) {
- if (log.isDebugEnabled()) {
- log.debug(job + " is locked by " + lockOwner);
- }
- return null;
- }
- if (job.isSuspended()) {
- if (log.isDebugEnabled()) {
- log.debug(job + " is suspended");
- }
- RetryExecutor.handleSuspendedJob(job) ;
- return null ;
- }
- lockOwner = Long.toString(jobId);
- if (job.isExclusive()) {
- List<?> exclusiveJobs = jobSession.findExclusiveJobs(lockOwner, job.getProcessInstance());
- // lock exclusive jobs
- int jobCount = exclusiveJobs.size();
- if (jobCount == 0) {
- // may happen if isolation level is below repeatable read
- if (log.isDebugEnabled()) {
- log.debug(job + " was locked during attempt to lock other jobs");
- }
- return null;
- }
- long[] exclusiveJobIds = new long[jobCount];
- for (int i = 0; i < jobCount; i++) {
- Job exclusiveJob = (Job) exclusiveJobs.get(i);
- exclusiveJob.setLockOwner(lockOwner);
- exclusiveJobIds[i] = exclusiveJob.getId();
- }
- if (log.isDebugEnabled()) {
- log.debug("locking jobs " + Arrays.toString(exclusiveJobIds));
- }
- // execute exclusive jobs in separate transaction
- postJobsExecution(jbpmContext, exclusiveJobIds);
- }
- else {
- // lock job to prevent others from deleting it
- job.setLockOwner(lockOwner);
- if (log.isDebugEnabled()) {
- log.debug("executing " + job);
- }
- executeJob(job, jbpmContext);
- }
- return null;
- }
-
- static void executeJob(Job job, JbpmContext jbpmContext) {
- try {
- if (job.execute(jbpmContext)) {
- jbpmContext.getJobSession().deleteJob(job);
- }
- }
- catch (RuntimeException e) {
- // nothing to do but clean up and exit
- throw e;
- }
- catch (Exception e) {
- // This is supposed to be recoverable and, under the DB executor, would be retried.
- // The state of the process will be uncertain but we refire here to be consistent.
- if (job.getRetries() > 0) {
- // save data about recoverable error condition
- StringWriter memoryWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(memoryWriter));
- job.setException(memoryWriter.toString());
- job.setRetries(job.getRetries() - 1);
-
- if (log.isDebugEnabled()) {
- log.debug("Rescheduling job " + job.getId() + " on error", e);
- }
- job.setLockOwner(null) ;
- jbpmContext.getServices().getMessageService().send(job) ;
- } else {
- log.error("Job retry count exceeded", e) ;
- }
- }
- }
-
- private static void postJobsExecution(JbpmContext jbpmContext, long[] exclusiveJobIds)
- throws NamingException, JMSException {
- Services services = jbpmContext.getServices();
- JmsMessageServiceFactory messageServiceFactory = (JmsMessageServiceFactory) services.getServiceFactory(Services.SERVICENAME_MESSAGE);
- Destination destination = messageServiceFactory.getCommandDestination();
-
- JmsMessageService messageService = (JmsMessageService) services.getMessageService();
- Session session = messageService.getSession();
- MessageProducer producer = session.createProducer(destination);
- try {
- Command command = new ExecuteJobsCommand(exclusiveJobIds);
- Message message = session.createObjectMessage(command);
- producer.send(message);
- }
- finally {
- producer.close();
- }
- }
-
- private static Log log = LogFactory.getLog(ExecuteJobCommand.class);
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobCommand.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,195 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.job;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageService;
+import org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageServiceFactory;
+import org.jboss.soa.esb.services.jbpm.integration.msg.RetryExecutor;
+import org.jbpm.JbpmContext;
+import org.jbpm.command.Command;
+import org.jbpm.db.JobSession;
+import org.jbpm.job.Job;
+import org.jbpm.svc.Services;
+
+/**
+ * Individual job processing command.
+ * @author Alejandro Guizar
+ */
+public class ExecuteJobCommand implements Command {
+
+ /**
+ * The job id.
+ */
+ private final long jobId;
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the job command with a specified job id.
+ * @param jobId The associated job id.
+ */
+ public ExecuteJobCommand(long jobId) {
+ this.jobId = jobId;
+ }
+
+ /**
+ * Execute the command.
+ * @param jbpmContext The jBPM context associated with the execution.
+ * @throws Exception for errors during execution.
+ */
+ public Object execute(JbpmContext jbpmContext) throws Exception {
+ JobSession jobSession = jbpmContext.getJobSession();
+ Job job = jobSession.getJob(jobId);
+ if (job == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("job " + jobId + " was deleted");
+ }
+ return null;
+ }
+ String lockOwner = job.getLockOwner();
+ if (lockOwner != null) {
+ if (log.isDebugEnabled()) {
+ log.debug(job + " is locked by " + lockOwner);
+ }
+ return null;
+ }
+ if (job.isSuspended()) {
+ if (log.isDebugEnabled()) {
+ log.debug(job + " is suspended");
+ }
+ RetryExecutor.handleSuspendedJob(job) ;
+ return null ;
+ }
+ lockOwner = Long.toString(jobId);
+ if (job.isExclusive()) {
+ List<?> exclusiveJobs = jobSession.findExclusiveJobs(lockOwner, job.getProcessInstance());
+ // lock exclusive jobs
+ int jobCount = exclusiveJobs.size();
+ if (jobCount == 0) {
+ // may happen if isolation level is below repeatable read
+ if (log.isDebugEnabled()) {
+ log.debug(job + " was locked during attempt to lock other jobs");
+ }
+ return null;
+ }
+ long[] exclusiveJobIds = new long[jobCount];
+ for (int i = 0; i < jobCount; i++) {
+ Job exclusiveJob = (Job) exclusiveJobs.get(i);
+ exclusiveJob.setLockOwner(lockOwner);
+ exclusiveJobIds[i] = exclusiveJob.getId();
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("locking jobs " + Arrays.toString(exclusiveJobIds));
+ }
+ // execute exclusive jobs in separate transaction
+ postJobsExecution(jbpmContext, exclusiveJobIds);
+ }
+ else {
+ // lock job to prevent others from deleting it
+ job.setLockOwner(lockOwner);
+ if (log.isDebugEnabled()) {
+ log.debug("executing " + job);
+ }
+ executeJob(job, jbpmContext);
+ }
+ return null;
+ }
+
+ /**
+ * Execute the specific job.
+ * @param job The job to execute.
+ * @param jbpmContext The jBPM context associated with the execution.
+ */
+ static void executeJob(Job job, JbpmContext jbpmContext) {
+ try {
+ if (job.execute(jbpmContext)) {
+ jbpmContext.getJobSession().deleteJob(job);
+ }
+ }
+ catch (RuntimeException e) {
+ // nothing to do but clean up and exit
+ throw e;
+ }
+ catch (Exception e) {
+ // This is supposed to be recoverable and, under the DB executor, would be retried.
+ // The state of the process will be uncertain but we refire here to be consistent.
+ if (job.getRetries() > 0) {
+ // save data about recoverable error condition
+ StringWriter memoryWriter = new StringWriter();
+ e.printStackTrace(new PrintWriter(memoryWriter));
+ job.setException(memoryWriter.toString());
+ job.setRetries(job.getRetries() - 1);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Rescheduling job " + job.getId() + " on error", e);
+ }
+ job.setLockOwner(null) ;
+ jbpmContext.getServices().getMessageService().send(job) ;
+ } else {
+ log.error("Job retry count exceeded", e) ;
+ }
+ }
+ }
+
+ /**
+ * Create a separate job for handling exclusive jobs.
+ * @param jbpmContext The jBPM context associated with the execution.
+ * @param exclusiveJobIds The list of exclusive jobs to execute.
+ * @throws JMSException For errors during delivery.
+ */
+ private static void postJobsExecution(JbpmContext jbpmContext, long[] exclusiveJobIds)
+ throws JMSException {
+ Services services = jbpmContext.getServices();
+ JmsMessageServiceFactory messageServiceFactory = (JmsMessageServiceFactory) services.getServiceFactory(Services.SERVICENAME_MESSAGE);
+ Destination destination = messageServiceFactory.getCommandDestination();
+
+ JmsMessageService messageService = (JmsMessageService) services.getMessageService();
+ Session session = messageService.getSession();
+ MessageProducer producer = session.createProducer(destination);
+ try {
+ Command command = new ExecuteJobsCommand(exclusiveJobIds);
+ Message message = session.createObjectMessage(command);
+ producer.send(message);
+ }
+ finally {
+ producer.close();
+ }
+ }
+
+ /**
+ * The log for this class.
+ */
+ private static Log log = LogFactory.getLog(ExecuteJobCommand.class);
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.job;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.soa.esb.services.jbpm.integration.msg.RetryExecutor;
-import org.jbpm.JbpmContext;
-import org.jbpm.command.Command;
-import org.jbpm.job.Job;
-
-/**
- * Batch job processing command.
- * @author Alejandro Guizar
- */
-public class ExecuteJobsCommand implements Command {
-
- private long[] jobIds;
-
- private static final long serialVersionUID = 1L;
- private static Log log = LogFactory.getLog(ExecuteJobsCommand.class);
-
- public ExecuteJobsCommand(long[] jobIds) {
- this.jobIds = jobIds;
- }
-
- public Object execute(JbpmContext jbpmContext) throws Exception {
- if (log.isDebugEnabled()) {
- log.debug("executing jobs " + Arrays.toString(jobIds));
- }
- List<Job> jobs = jbpmContext.getJobSession().loadJobs(jobIds);
- for (Job job: jobs) {
- if (job.isSuspended()) {
- if (log.isDebugEnabled()) {
- log.debug(job + " is suspended");
- }
- RetryExecutor.handleSuspendedJob(job) ;
- } else {
- ExecuteJobCommand.executeJob(job, jbpmContext);
- }
- }
- return null;
- }
-
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteJobsCommand.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.job;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.soa.esb.services.jbpm.integration.msg.RetryExecutor;
+import org.jbpm.JbpmContext;
+import org.jbpm.command.Command;
+import org.jbpm.job.Job;
+
+/**
+ * Batch job processing command.
+ * @author Alejandro Guizar
+ */
+public class ExecuteJobsCommand implements Command {
+
+ /**
+ * The job ids.
+ */
+ private long[] jobIds;
+
+ private static final long serialVersionUID = 1L;
+ /**
+ * The log for this class.
+ */
+ private static Log log = LogFactory.getLog(ExecuteJobsCommand.class);
+
+ /**
+ * Create the job command with a specified list of job ids.
+ * @param jobIds The associated job ids.
+ */
+ public ExecuteJobsCommand(long[] jobIds) {
+ this.jobIds = jobIds;
+ }
+
+ /**
+ * Execute the command.
+ * @param jbpmContext The jBPM context associated with the execution.
+ * @throws Exception for errors during execution.
+ */
+ public Object execute(JbpmContext jbpmContext) throws Exception {
+ if (log.isDebugEnabled()) {
+ log.debug("executing jobs " + Arrays.toString(jobIds));
+ }
+ List<Job> jobs = jbpmContext.getJobSession().loadJobs(jobIds);
+ for (Job job: jobs) {
+ if (job.isSuspended()) {
+ if (log.isDebugEnabled()) {
+ log.debug(job + " is suspended");
+ }
+ RetryExecutor.handleSuspendedJob(job) ;
+ } else {
+ ExecuteJobCommand.executeJob(job, jbpmContext);
+ }
+ }
+ return null;
+ }
+
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.job;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.soa.esb.services.jbpm.integration.msg.RetryExecutor;
-import org.jbpm.JbpmContext;
-import org.jbpm.command.Command;
-import org.jbpm.job.Timer;
-
-/**
- * Command for processing timer executions, based on the jBPM code.
- */
-public class ExecuteTimerCommand implements Command {
-
- private final long timerId;
-
- private static final long serialVersionUID = 1L;
-
- public ExecuteTimerCommand(long timerId) {
- this.timerId = timerId;
- }
-
- public Object execute(JbpmContext jbpmContext) throws Exception {
- Timer timer = jbpmContext.getJobSession().loadTimer(timerId);
- if (timer.isSuspended()) {
- if (log.isDebugEnabled()) {
- log.debug(timer + " is suspended");
- }
- RetryExecutor.handleSuspendedTimer(timer) ;
- return null ;
- }
- timer.setLockOwner(getClass().getName()); // prevent others from removing timer
- log.debug("executing " + timer);
- try {
- if (timer.execute(jbpmContext)) {
- jbpmContext.getServices().getSchedulerService().deleteTimer(timer);
- } else if (timer.getRepeat() != null) {
- if (log.isDebugEnabled()) {
- log.debug("scheduling timer for repeat on " + timer.getDueDate());
- }
- jbpmContext.getServices().getSchedulerService().createTimer(timer);
- }
- }
- catch (RuntimeException e) {
- // nothing to do but clean up and exit
- throw e;
- }
- catch (Exception e) {
- // This is supposed to be recoverable and, under the DB executor, would be retried.
- // The state of the process will be uncertain but we refire here to be consistent.
- // How does the retry count get reset?
- if (timer.getRetries() > 1) {
- // save data about recoverable error condition
- StringWriter memoryWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(memoryWriter));
- timer.setException(memoryWriter.toString());
- timer.setRetries(timer.getRetries() - 1);
-
- if (log.isDebugEnabled()) {
- log.debug("Rescheduling timer " + timer.getId() + " on error " + timer.getDueDate(), e);
- }
- timer.setLockOwner(null) ;
- jbpmContext.getServices().getSchedulerService().createTimer(timer);
- } else {
- log.warn("Timer retry count exceeded", e) ;
- }
- }
- return null;
- }
-
- private static final Log log = LogFactory.getLog(ExecuteTimerCommand.class);
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/job/ExecuteTimerCommand.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.job;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.soa.esb.services.jbpm.integration.msg.RetryExecutor;
+import org.jbpm.JbpmContext;
+import org.jbpm.command.Command;
+import org.jbpm.job.Timer;
+
+/**
+ * Command for processing timer executions, based on the jBPM code.
+ */
+public class ExecuteTimerCommand implements Command {
+
+ /**
+ * The timer id.
+ */
+ private final long timerId;
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the timer command with a specified timer id.
+ * @param timerId The associated timer id.
+ */
+ public ExecuteTimerCommand(long timerId) {
+ this.timerId = timerId;
+ }
+
+ /**
+ * Execute the command.
+ * @param jbpmContext The jBPM context associated with the execution.
+ * @throws Exception for errors during execution.
+ */
+ public Object execute(JbpmContext jbpmContext) throws Exception {
+ Timer timer = jbpmContext.getJobSession().loadTimer(timerId);
+ if (timer.isSuspended()) {
+ if (log.isDebugEnabled()) {
+ log.debug(timer + " is suspended");
+ }
+ RetryExecutor.handleSuspendedTimer(timer) ;
+ return null ;
+ }
+ timer.setLockOwner(getClass().getName()); // prevent others from removing timer
+ log.debug("executing " + timer);
+ try {
+ if (timer.execute(jbpmContext)) {
+ jbpmContext.getServices().getSchedulerService().deleteTimer(timer);
+ } else if (timer.getRepeat() != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("scheduling timer for repeat on " + timer.getDueDate());
+ }
+ jbpmContext.getServices().getSchedulerService().createTimer(timer);
+ }
+ }
+ catch (RuntimeException e) {
+ // nothing to do but clean up and exit
+ throw e;
+ }
+ catch (Exception e) {
+ // This is supposed to be recoverable and, under the DB executor, would be retried.
+ // The state of the process will be uncertain but we refire here to be consistent.
+ // How does the retry count get reset?
+ if (timer.getRetries() > 1) {
+ // save data about recoverable error condition
+ StringWriter memoryWriter = new StringWriter();
+ e.printStackTrace(new PrintWriter(memoryWriter));
+ timer.setException(memoryWriter.toString());
+ timer.setRetries(timer.getRetries() - 1);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Rescheduling timer " + timer.getId() + " on error " + timer.getDueDate(), e);
+ }
+ timer.setLockOwner(null) ;
+ jbpmContext.getServices().getSchedulerService().createTimer(timer);
+ } else {
+ log.warn("Timer retry count exceeded", e) ;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * The log associated with this class.
+ */
+ private static final Log log = LogFactory.getLog(ExecuteTimerCommand.class);
+}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg)
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.msg;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-import org.jboss.soa.esb.services.jbpm.integration.AbstractJmsJobService;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.JbpmException;
-import org.jbpm.job.Job;
-import org.jbpm.msg.MessageService;
-
-public class JmsMessageService extends AbstractJmsJobService implements MessageService {
- /**
- * Serial Version UID for this class.
- */
- private static final long serialVersionUID = 9165420651941799915L;
-
- public JmsMessageService(Connection connection, Destination destination, boolean isCommitEnabled) throws JMSException {
- super(getJbpmContext(), connection, destination, isCommitEnabled) ;
- }
-
- private static JbpmContext getJbpmContext()
- {
- final JbpmContext jbpmContext = JbpmConfiguration.getInstance().getCurrentJbpmContext();
- if (jbpmContext==null) {
- throw new JbpmException("jms message service must be created inside a jbpm context");
- }
- return jbpmContext ;
- }
-
- public void send(Job job) {
- sendJob(job) ;
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.msg;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+
+import org.jboss.soa.esb.services.jbpm.integration.AbstractJmsJobService;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
+import org.jbpm.job.Job;
+import org.jbpm.msg.MessageService;
+
+public class JmsMessageService extends AbstractJmsJobService implements MessageService {
+ /**
+ * Serial Version UID for this class.
+ */
+ private static final long serialVersionUID = 9165420651941799915L;
+
+ /**
+ * Construct the JMS message service.
+ * @param connection The JMS connection.
+ * @param destination The JMS destination.
+ * @param isCommitEnabled true if commit is to be invoked, false otherwise.
+ * @throws JMSException For JMS errors.
+ */
+ public JmsMessageService(Connection connection, Destination destination, boolean isCommitEnabled) throws JMSException {
+ super(getJbpmContext(), connection, destination, isCommitEnabled) ;
+ }
+
+ /**
+ * Obtain the current jBPM context.
+ * @return The jBPM context.
+ * @throws JbpmException if there is no active jBPM context.
+ */
+ private static JbpmContext getJbpmContext()
+ {
+ final JbpmContext jbpmContext = JbpmConfiguration.getInstance().getCurrentJbpmContext();
+ if (jbpmContext==null) {
+ throw new JbpmException("jms message service must be created inside a jbpm context");
+ }
+ return jbpmContext ;
+ }
+
+ /**
+ * Send the job to the job executor.
+ * @param job The job to send.
+ */
+ public void send(Job job) {
+ sendJob(job) ;
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,199 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.msg;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jbpm.JbpmException;
-import org.jbpm.svc.Service;
-import org.jbpm.svc.ServiceFactory;
-
-/**
- * Based on the jBPM JmsMessageServiceFactory, this service delivers messages to the
- * job/command listeners over JCA/JMS inflow.
- *
- * <h3>Configuration</h3>
- *
- * The JMS message service factory exposes the following configurable fields.
- *
- * <ul>
- * <li><code>connectionFactoryJndiName</code></li>
- * <li><code>destinationJndiName</code></li>
- * <li><code>commandJndiName</code></li>
- * <li><code>dlqJndiName</code></li>
- * <li><code>isCommitEnabled</code></li>
- * </ul>
- *
- * Refer to the jBPM manual for details.
- *
- * @author Tom Baeyens
- * @author Alejandro Guizar
- */
-public class JmsMessageServiceFactory implements ServiceFactory
-{
- private static final long serialVersionUID = 1L;
-
- String connectionFactoryJndiName = "java:/JmsXA";
- String destinationJndiName = "queue/JbpmJobQueue";
- String commandJndiName = "queue/JbpmCommandQueue";
- String dlqJndiName = "queue/JbpmDLQ";
- boolean isCommitEnabled = false;
- int idleInterval = 15000; // 15 secs
- int maxIdleInterval = 3600000; // 1 hour
- int maxRetryJobs = 20;
-
- private ConnectionFactory connectionFactory;
- private Destination destination;
- private Destination commandDestination;
- private Destination dlqDestination;
- private RetryExecutor retryExecutor ;
- private Thread retryExecutorThread ;
-
- public JmsMessageServiceFactory()
- {
- retryExecutor = new RetryExecutor(idleInterval, maxIdleInterval, maxRetryJobs) ;
- retryExecutorThread = new Thread(retryExecutor) ;
- retryExecutorThread.start() ;
- }
-
- public ConnectionFactory getConnectionFactory()
- {
- if (connectionFactory == null)
- {
- try
- {
- connectionFactory = (ConnectionFactory)lookup(connectionFactoryJndiName);
- }
- catch (NamingException e)
- {
- throw new JbpmException("could not retrieve message connection factory", e);
- }
- }
- return connectionFactory;
- }
-
- public Destination getDestination()
- {
- if (destination == null)
- {
- try
- {
- destination = (Destination)lookup(destinationJndiName);
- }
- catch (NamingException e)
- {
- throw new JbpmException("could not retrieve job destination", e);
- }
- }
- return destination;
- }
-
- public Destination getCommandDestination()
- {
- if (commandDestination == null)
- {
- try
- {
- commandDestination = (Destination)lookup(commandJndiName);
- }
- catch (NamingException e)
- {
- throw new JbpmException("could not retrieve command destination", e);
- }
- }
- return commandDestination;
- }
-
- public Destination getDLQDestination()
- {
- if (dlqDestination == null)
- {
- try
- {
- dlqDestination = (Destination)lookup(dlqJndiName);
- }
- catch (NamingException e)
- {
- throw new JbpmException("could not retrieve dlq destination", e);
- }
- }
- return dlqDestination;
- }
-
- public boolean isCommitEnabled()
- {
- return isCommitEnabled;
- }
-
- private static Object lookup(String name) throws NamingException
- {
- Context initial = new InitialContext();
- try
- {
- return initial.lookup(name);
- }
- finally
- {
- initial.close();
- }
- }
-
- public Service openService()
- {
- try
- {
- Connection connection = getConnectionFactory().createConnection();
- return new JmsMessageService(connection, getDestination(), isCommitEnabled);
- }
- catch (JMSException e)
- {
- throw new JbpmException("couldn't open message session", e);
- }
- }
-
- public void close()
- {
- connectionFactory = null;
- destination = null;
- commandDestination = null;
- dlqDestination = null;
- try
- {
- retryExecutor.terminate() ;
- try
- {
- retryExecutorThread.join() ;
- }
- catch (final InterruptedException ie) {}
- }
- finally
- {
- retryExecutorThread = null ;
- }
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageServiceFactory.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,277 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.msg;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jbpm.JbpmException;
+import org.jbpm.svc.Service;
+import org.jbpm.svc.ServiceFactory;
+
+/**
+ * Based on the jBPM JmsMessageServiceFactory, this service delivers messages to the
+ * job/command listeners over JCA/JMS inflow.
+ *
+ * <h3>Configuration</h3>
+ *
+ * The JMS message service factory exposes the following configurable fields.
+ *
+ * <ul>
+ * <li><code>connectionFactoryJndiName</code></li>
+ * <li><code>destinationJndiName</code></li>
+ * <li><code>commandJndiName</code></li>
+ * <li><code>dlqJndiName</code></li>
+ * <li><code>isCommitEnabled</code></li>
+ * <li><code>idleInterval</code></li>
+ * <li><code>maxIdleInterval</code></li>
+ * <li><code>maxRetryJobs</code></li>
+ * </ul>
+ *
+ * @author Tom Baeyens
+ * @author Alejandro Guizar
+ */
+public class JmsMessageServiceFactory implements ServiceFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The JNDI name for locating the JMS connection factory.
+ */
+ String connectionFactoryJndiName = "java:/JmsXA";
+ /**
+ * The JNDI name for locating the jBPM job queue destination.
+ */
+ String destinationJndiName = "queue/JbpmJobQueue";
+ /**
+ * The JNDI name for locating the jBPM command queue destination.
+ */
+ String commandJndiName = "queue/JbpmCommandQueue";
+ /**
+ * The JNDI name for locating the jBPM dlq destination.
+ */
+ String dlqJndiName = "queue/JbpmDLQ";
+ /**
+ * A flag indicating whether commit should be invoked on the JMS session.
+ */
+ boolean isCommitEnabled = false;
+ /**
+ * The default idle interval for the retry executor.
+ */
+ int idleInterval = 15000; // 15 secs
+ /**
+ * The maximum idle interval for the retry executor.
+ */
+ int maxIdleInterval = 3600000; // 1 hour
+ /**
+ * The maximum number of jobs to reschedule on each poll.
+ */
+ int maxRetryJobs = 20;
+
+ /**
+ * The JMS connection factory associated with the scheduler.
+ */
+ private ConnectionFactory connectionFactory;
+ /**
+ * The JMS destination for the jBPM job queue.
+ */
+ private Destination destination;
+ /**
+ * The JMS destination for the jBPM command queue.
+ */
+ private Destination commandDestination;
+ /**
+ * The JMS destination for the jBPM dlq.
+ */
+ private Destination dlqDestination;
+ /**
+ * The retry executor.
+ */
+ private RetryExecutor retryExecutor ;
+ /**
+ * The thread associated with the retry executor.
+ */
+ private Thread retryExecutorThread ;
+
+ /**
+ * Construct the JMS message service factory.
+ */
+ public JmsMessageServiceFactory()
+ {
+ retryExecutor = new RetryExecutor(idleInterval, maxIdleInterval, maxRetryJobs) ;
+ retryExecutorThread = new Thread(retryExecutor) ;
+ retryExecutorThread.start() ;
+ }
+
+ /**
+ * Get the JMS connection factory associated with this scheduler.
+ * @return The associated JMS connection factory.
+ */
+ public ConnectionFactory getConnectionFactory()
+ {
+ if (connectionFactory == null)
+ {
+ try
+ {
+ connectionFactory = (ConnectionFactory)lookup(connectionFactoryJndiName);
+ }
+ catch (NamingException e)
+ {
+ throw new JbpmException("could not retrieve message connection factory", e);
+ }
+ }
+ return connectionFactory;
+ }
+
+ /**
+ * Get the jBPM job queue destination associated with this message service.
+ * @return The associated jBPM job queue.
+ */
+ public Destination getDestination()
+ {
+ if (destination == null)
+ {
+ try
+ {
+ destination = (Destination)lookup(destinationJndiName);
+ }
+ catch (NamingException e)
+ {
+ throw new JbpmException("could not retrieve job destination", e);
+ }
+ }
+ return destination;
+ }
+
+ /**
+ * Get the jBPM command queue destination associated with this message service.
+ * @return The associated jBPM command queue.
+ */
+ public Destination getCommandDestination()
+ {
+ if (commandDestination == null)
+ {
+ try
+ {
+ commandDestination = (Destination)lookup(commandJndiName);
+ }
+ catch (NamingException e)
+ {
+ throw new JbpmException("could not retrieve command destination", e);
+ }
+ }
+ return commandDestination;
+ }
+
+ /**
+ * Get the jBPM dlq destination associated with this message service.
+ * @return The associated jBPM dlq.
+ */
+ public Destination getDLQDestination()
+ {
+ if (dlqDestination == null)
+ {
+ try
+ {
+ dlqDestination = (Destination)lookup(dlqJndiName);
+ }
+ catch (NamingException e)
+ {
+ throw new JbpmException("could not retrieve dlq destination", e);
+ }
+ }
+ return dlqDestination;
+ }
+
+ /**
+ * Get the commitEnabled flag.
+ * @return true if commit is to be invoked on the JMS session, false otherwise.
+ */
+ public boolean isCommitEnabled()
+ {
+ return isCommitEnabled;
+ }
+
+ /**
+ * Lookup a name within JNDI.
+ * @param name The JNDI name to locate.
+ * @return The object bound to the name.
+ * @throws NamingException For errors locating the specified object within JNDI.
+ */
+ private static Object lookup(String name) throws NamingException
+ {
+ Context initial = new InitialContext();
+ try
+ {
+ return initial.lookup(name);
+ }
+ finally
+ {
+ initial.close();
+ }
+ }
+
+ /**
+ * Create a JMS message service based on this factory.
+ */
+ public Service openService()
+ {
+ try
+ {
+ Connection connection = getConnectionFactory().createConnection();
+ return new JmsMessageService(connection, getDestination(), isCommitEnabled);
+ }
+ catch (JMSException e)
+ {
+ throw new JbpmException("couldn't open message session", e);
+ }
+ }
+
+ /**
+ * Close this factory.
+ */
+ public void close()
+ {
+ connectionFactory = null;
+ destination = null;
+ commandDestination = null;
+ dlqDestination = null;
+ try
+ {
+ retryExecutor.terminate() ;
+ try
+ {
+ retryExecutorThread.join() ;
+ }
+ catch (final InterruptedException ie) {}
+ }
+ finally
+ {
+ retryExecutorThread = null ;
+ }
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,211 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.msg;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.apache.log4j.Logger;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.db.JobSession;
-import org.jbpm.job.Job;
-import org.jbpm.job.Timer;
-
-
-/**
- * Executor responsible for checking for retry invocations. The DB service does
- * this implicitly but we need to explicitly check for this during JMS.
- *
- * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class RetryExecutor implements Runnable
-{
- /**
- * The lock name associated with the executor.
- */
- public static final String RETRY_EXECUTOR = "RetryExecutor" ;
- /**
- * The logger for this class.
- */
- private static final Logger LOGGER = Logger.getLogger(RetryExecutor.class) ;
-
- /**
- * terminate the executor thread.
- */
- private boolean terminateRetryExecutorThread ;
-
- /**
- * The wait lock.
- */
- private Lock waitLock = new ReentrantLock() ;
- /**
- * The wait condition.
- */
- private Condition waitCondition = waitLock.newCondition() ;
-
- /**
- * The normal idle interval.
- */
- private final int idleInterval ;
- /**
- * The maximum idle interval.
- */
- private int maxIdleInterval ;
- /**
- * The maximum number of jobs to reschedule on each poll.
- */
- private int maxRetryJobs ;
-
- /**
- * Create the retry executor thread.
- * @param idleInterval The idle interval.
- * @param maxIdleInterval The max idle interval.
- * @param maxRetryJobs The max number of retry jobs.
- */
- public RetryExecutor(final int idleInterval, final int maxIdleInterval, final int maxRetryJobs)
- {
- this.idleInterval = idleInterval ;
- this.maxIdleInterval = maxIdleInterval ;
- this.maxRetryJobs = maxRetryJobs ;
- }
- /**
- * Look for newly active suspended/retry jobs.
- */
- public void run()
- {
- int currentIdleInterval = idleInterval ;
- while(true)
- {
- final JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext() ;
- try
- {
- final JobSession jobSession = jbpmContext.getJobSession() ;
- if (jobSession != null)
- {
- final Set<Long> monitoredJobs = new HashSet<Long>() ;
- for(int count = 0 ; count < maxRetryJobs ; count++)
- {
- final Job job = jobSession.getFirstDueJob(RETRY_EXECUTOR, monitoredJobs) ;
- if (job == null)
- {
- break ;
- }
- monitoredJobs.add(Long.valueOf(job.getId())) ;
- job.setLockOwner(null) ;
- if (job instanceof Timer)
- {
- final Timer timer = (Timer)job ;
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Rescheduling timer " + timer.getId());
- }
- jbpmContext.getServices().getSchedulerService().createTimer(timer);
- }
- else
- {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Rescheduling job " + job.getId());
- }
- jbpmContext.getServices().getMessageService().send(job) ;
- }
- }
- }
- }
- catch (final Throwable th)
- {
- LOGGER.debug("Unexpected error rescheduling jobs, extending idle period", th);
- // after an exception, the current idle interval is doubled to prevent
- // continuous exception generation when e.g. the db is unreachable
- currentIdleInterval <<= 1;
- if (currentIdleInterval > maxIdleInterval || currentIdleInterval < 0)
- {
- currentIdleInterval = maxIdleInterval;
- }
- }
- finally
- {
- jbpmContext.close() ;
- }
- waitLock.lock() ;
- try
- {
- if (!terminateRetryExecutorThread)
- {
- try
- {
- waitCondition.await(currentIdleInterval, TimeUnit.MILLISECONDS) ;
- }
- catch (final InterruptedException ie) {} // ignore
- }
- if (terminateRetryExecutorThread)
- {
- break ;
- }
- }
- finally
- {
- waitLock.unlock() ;
- }
- }
- }
-
- /**
- * Request a termination of the loop.
- */
- public void terminate()
- {
- waitLock.lock() ;
- try
- {
- terminateRetryExecutorThread = true ;
- waitCondition.signal() ;
- }
- finally
- {
- waitLock.unlock() ;
- }
- }
-
- /**
- * Process a suspended job.
- * @param job The suspended job.
- */
- public static void handleSuspendedJob(final Job job)
- {
- job.setLockOwner(RETRY_EXECUTOR) ;
- JbpmConfiguration.getInstance().getCurrentJbpmContext().getServices().getMessageService().send(job) ;
- }
-
- /**
- * Process a suspended timer.
- * @param timer The suspended timer.
- */
- public static void handleSuspendedTimer(final Timer timer)
- {
- timer.setLockOwner(RETRY_EXECUTOR) ;
- JbpmConfiguration.getInstance().getCurrentJbpmContext().getServices().getSchedulerService().createTimer(timer) ;
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/RetryExecutor.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.msg;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.apache.log4j.Logger;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.db.JobSession;
+import org.jbpm.job.Job;
+import org.jbpm.job.Timer;
+
+
+/**
+ * Executor responsible for checking for retry invocations. The DB service does
+ * this implicitly but we need to explicitly check for this during JMS.
+ *
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class RetryExecutor implements Runnable
+{
+ /**
+ * The lock name associated with the executor.
+ */
+ public static final String RETRY_EXECUTOR = "RetryExecutor" ;
+ /**
+ * The logger for this class.
+ */
+ private static final Logger LOGGER = Logger.getLogger(RetryExecutor.class) ;
+
+ /**
+ * terminate the executor thread.
+ */
+ private boolean terminateRetryExecutorThread ;
+
+ /**
+ * The wait lock.
+ */
+ private Lock waitLock = new ReentrantLock() ;
+ /**
+ * The wait condition.
+ */
+ private Condition waitCondition = waitLock.newCondition() ;
+
+ /**
+ * The normal idle interval.
+ */
+ private final int idleInterval ;
+ /**
+ * The maximum idle interval.
+ */
+ private int maxIdleInterval ;
+ /**
+ * The maximum number of jobs to reschedule on each poll.
+ */
+ private int maxRetryJobs ;
+
+ /**
+ * Create the retry executor thread.
+ * @param idleInterval The idle interval.
+ * @param maxIdleInterval The max idle interval.
+ * @param maxRetryJobs The max number of retry jobs.
+ */
+ public RetryExecutor(final int idleInterval, final int maxIdleInterval, final int maxRetryJobs)
+ {
+ this.idleInterval = idleInterval ;
+ this.maxIdleInterval = maxIdleInterval ;
+ this.maxRetryJobs = maxRetryJobs ;
+ }
+ /**
+ * Look for newly active suspended/retry jobs.
+ */
+ public void run()
+ {
+ int currentIdleInterval = idleInterval ;
+ while(true)
+ {
+ final JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext() ;
+ try
+ {
+ final JobSession jobSession = jbpmContext.getJobSession() ;
+ if (jobSession != null)
+ {
+ final Set<Long> monitoredJobs = new HashSet<Long>() ;
+ for(int count = 0 ; count < maxRetryJobs ; count++)
+ {
+ final Job job = jobSession.getFirstDueJob(RETRY_EXECUTOR, monitoredJobs) ;
+ if (job == null)
+ {
+ break ;
+ }
+ monitoredJobs.add(Long.valueOf(job.getId())) ;
+ job.setLockOwner(null) ;
+ if (job instanceof Timer)
+ {
+ final Timer timer = (Timer)job ;
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Rescheduling timer " + timer.getId());
+ }
+ jbpmContext.getServices().getSchedulerService().createTimer(timer);
+ }
+ else
+ {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Rescheduling job " + job.getId());
+ }
+ jbpmContext.getServices().getMessageService().send(job) ;
+ }
+ }
+ }
+ }
+ catch (final Throwable th)
+ {
+ LOGGER.debug("Unexpected error rescheduling jobs, extending idle period", th);
+ // after an exception, the current idle interval is doubled to prevent
+ // continuous exception generation when e.g. the db is unreachable
+ currentIdleInterval <<= 1;
+ if (currentIdleInterval > maxIdleInterval || currentIdleInterval < 0)
+ {
+ currentIdleInterval = maxIdleInterval;
+ }
+ }
+ finally
+ {
+ jbpmContext.close() ;
+ }
+ waitLock.lock() ;
+ try
+ {
+ if (!terminateRetryExecutorThread)
+ {
+ try
+ {
+ waitCondition.await(currentIdleInterval, TimeUnit.MILLISECONDS) ;
+ }
+ catch (final InterruptedException ie) {} // ignore
+ }
+ if (terminateRetryExecutorThread)
+ {
+ break ;
+ }
+ }
+ finally
+ {
+ waitLock.unlock() ;
+ }
+ }
+ }
+
+ /**
+ * Request a termination of the loop.
+ */
+ public void terminate()
+ {
+ waitLock.lock() ;
+ try
+ {
+ terminateRetryExecutorThread = true ;
+ waitCondition.signal() ;
+ }
+ finally
+ {
+ waitLock.unlock() ;
+ }
+ }
+
+ /**
+ * Process a suspended job.
+ * @param job The suspended job.
+ */
+ public static void handleSuspendedJob(final Job job)
+ {
+ job.setLockOwner(RETRY_EXECUTOR) ;
+ JbpmConfiguration.getInstance().getCurrentJbpmContext().getServices().getMessageService().send(job) ;
+ }
+
+ /**
+ * Process a suspended timer.
+ * @param timer The suspended timer.
+ */
+ public static void handleSuspendedTimer(final Timer timer)
+ {
+ timer.setLockOwner(RETRY_EXECUTOR) ;
+ JbpmConfiguration.getInstance().getCurrentJbpmContext().getServices().getSchedulerService().createTimer(timer) ;
+ }
+}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer)
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,52 +0,0 @@
-package org.jboss.soa.esb.services.jbpm.integration.timer;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-import org.jboss.soa.esb.services.jbpm.integration.AbstractJmsJobService;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.graph.exe.Token;
-import org.jbpm.job.Timer;
-import org.jbpm.scheduler.SchedulerService;
-
-/**
- * Implementation of the jBPM scheduler service targeting quartz.
- *
- * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class JmsSchedulerService extends AbstractJmsJobService implements SchedulerService
-{
- /**
- * Serial Version UID for this class.
- */
- private static final long serialVersionUID = -8830533950742335914L;
-
- public JmsSchedulerService(final JbpmContext jbpmContext, final Connection connection,
- final Destination destination, boolean isCommitEnabled)
- throws JMSException
- {
- super(jbpmContext, connection, destination, isCommitEnabled) ;
- }
-
- public void createTimer(final Timer timer)
- {
- sendTimer(timer) ;
- }
-
- public void deleteTimer(final Timer timer)
- {
- getJobSession().deleteJob(timer) ;
- }
-
- public void deleteTimersByName(final String timerName, final Token token)
- {
- getJobSession().deleteTimersByName(timerName, token) ;
- }
-
- public void deleteTimersByProcessInstance(final ProcessInstance processInstance)
- {
- getJobSession().deleteJobsForProcessInstance(processInstance) ;
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,77 @@
+package org.jboss.soa.esb.services.jbpm.integration.timer;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+
+import org.jboss.soa.esb.services.jbpm.integration.AbstractJmsJobService;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.job.Timer;
+import org.jbpm.scheduler.SchedulerService;
+
+/**
+ * Implementation of the jBPM scheduler service targeting quartz.
+ *
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JmsSchedulerService extends AbstractJmsJobService implements SchedulerService
+{
+ /**
+ * Serial Version UID for this class.
+ */
+ private static final long serialVersionUID = -8830533950742335914L;
+
+ /**
+ * Create the JMS scheduler service.
+ * @param jbpmContext The current jBPM context.
+ * @param connection The associated JMS connection.
+ * @param destination The JMS destination for jobs.
+ * @param isCommitEnabled true if commit should be invoked, false otherwise.
+ * @throws JMSException For errors in constructing the JMS session.
+ */
+ public JmsSchedulerService(final JbpmContext jbpmContext, final Connection connection,
+ final Destination destination, boolean isCommitEnabled)
+ throws JMSException
+ {
+ super(jbpmContext, connection, destination, isCommitEnabled) ;
+ }
+
+ /**
+ * Create a timer.
+ * @param timer the timer to create.
+ */
+ public void createTimer(final Timer timer)
+ {
+ sendTimer(timer) ;
+ }
+
+ /**
+ * Delete a specific timer.
+ * @param timer The timer to delete.
+ */
+ public void deleteTimer(final Timer timer)
+ {
+ getJobSession().deleteJob(timer) ;
+ }
+
+ /**
+ * Delete a specific timer given a name and associated jBPM token.
+ * @param timerName The name of the timer to delete.
+ * @param token The token associated with the timer.
+ */
+ public void deleteTimersByName(final String timerName, final Token token)
+ {
+ getJobSession().deleteTimersByName(timerName, token) ;
+ }
+
+ /**
+ * Delete timers associated with a jBPM process instance.
+ * @param processInstance The process instance associated with the timers.
+ */
+ public void deleteTimersByProcessInstance(final ProcessInstance processInstance)
+ {
+ getJobSession().deleteJobsForProcessInstance(processInstance) ;
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.timer;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmException;
-import org.jbpm.svc.Service;
-import org.jbpm.svc.ServiceFactory;
-
-/**
- * Implementation of a scheduler service using quartz.
- */
-public class JmsSchedulerServiceFactory implements ServiceFactory
-{
- /**
- * Serial Version UID for this class.
- */
- private static final long serialVersionUID = 1642915732295620551L;
-
- String connectionFactoryJndiName = "java:/JmsXA";
- String destinationJndiName = "queue/JbpmTimerQueue";
- boolean isCommitEnabled = false;
-
- private ConnectionFactory connectionFactory;
- private Destination destination;
-
- public ConnectionFactory getConnectionFactory()
- {
- if (connectionFactory == null)
- {
- try
- {
- connectionFactory = (ConnectionFactory)lookup(connectionFactoryJndiName);
- }
- catch (NamingException e)
- {
- throw new JbpmException("could not retrieve message connection factory", e);
- }
- }
- return connectionFactory;
- }
-
- public Destination getDestination()
- {
- if (destination == null)
- {
- try
- {
- destination = (Destination)lookup(destinationJndiName);
- }
- catch (NamingException e)
- {
- throw new JbpmException("could not retrieve job destination", e);
- }
- }
- return destination;
- }
-
- public boolean isCommitEnabled()
- {
- return isCommitEnabled;
- }
-
- private static Object lookup(String name) throws NamingException
- {
- Context initial = new InitialContext();
- try
- {
- return initial.lookup(name);
- }
- finally
- {
- initial.close();
- }
- }
-
- public Service openService()
- {
- try
- {
- final Connection connection = getConnectionFactory().createConnection();
- return new JmsSchedulerService(JbpmConfiguration.getInstance().getCurrentJbpmContext(),
- connection, getDestination(), isCommitEnabled);
- }
- catch (JMSException e)
- {
- throw new JbpmException("couldn't open message session", e);
- }
- }
-
- public void close()
- {
- connectionFactory = null;
- destination = null;
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,162 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.timer;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmException;
+import org.jbpm.svc.Service;
+import org.jbpm.svc.ServiceFactory;
+
+/**
+ * Implementation of a scheduler service using quartz.
+ */
+public class JmsSchedulerServiceFactory implements ServiceFactory
+{
+ /**
+ * Serial Version UID for this class.
+ */
+ private static final long serialVersionUID = 1642915732295620551L;
+
+ /**
+ * The JNDI name for locating the JMS connection factory.
+ */
+ String connectionFactoryJndiName = "java:/JmsXA";
+ /**
+ * The JNDI name for locating the jBPM timer queue destination.
+ */
+ String destinationJndiName = "queue/JbpmTimerQueue";
+ /**
+ * A flag indicating whether commit should be invoked on the JMS session.
+ */
+ boolean isCommitEnabled = false;
+
+ /**
+ * The JMS connection factory associated with the scheduler.
+ */
+ private ConnectionFactory connectionFactory;
+ /**
+ * The JMS destination for the scheduler.
+ */
+ private Destination destination;
+
+ /**
+ * Get the JMS connection factory associated with this scheduler.
+ * @return The associated JMS connection factory.
+ */
+ public ConnectionFactory getConnectionFactory()
+ {
+ if (connectionFactory == null)
+ {
+ try
+ {
+ connectionFactory = (ConnectionFactory)lookup(connectionFactoryJndiName);
+ }
+ catch (NamingException e)
+ {
+ throw new JbpmException("could not retrieve message connection factory", e);
+ }
+ }
+ return connectionFactory;
+ }
+
+ /**
+ * Get the JMS destination associated with this scheduler.
+ * @return The associated JMS destination.
+ */
+ public Destination getDestination()
+ {
+ if (destination == null)
+ {
+ try
+ {
+ destination = (Destination)lookup(destinationJndiName);
+ }
+ catch (NamingException e)
+ {
+ throw new JbpmException("could not retrieve job destination", e);
+ }
+ }
+ return destination;
+ }
+
+ /**
+ * Get the commitEnabled flag.
+ * @return true if commit is to be invoked on the JMS session, false otherwise.
+ */
+ public boolean isCommitEnabled()
+ {
+ return isCommitEnabled;
+ }
+
+ /**
+ * Lookup a name within JNDI.
+ * @param name The JNDI name to locate.
+ * @return The object bound to the name.
+ * @throws NamingException For errors locating the specified object within JNDI.
+ */
+ private static Object lookup(String name) throws NamingException
+ {
+ Context initial = new InitialContext();
+ try
+ {
+ return initial.lookup(name);
+ }
+ finally
+ {
+ initial.close();
+ }
+ }
+
+ /**
+ * Create a JMS scheduler service based on this factory.
+ */
+ public Service openService()
+ {
+ try
+ {
+ final Connection connection = getConnectionFactory().createConnection();
+ return new JmsSchedulerService(JbpmConfiguration.getInstance().getCurrentJbpmContext(),
+ connection, getDestination(), isCommitEnabled);
+ }
+ catch (JMSException e)
+ {
+ throw new JbpmException("couldn't open message session", e);
+ }
+ }
+
+ /**
+ * Close this factory.
+ */
+ public void close()
+ {
+ connectionFactory = null;
+ destination = null;
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,187 +0,0 @@
-package org.jboss.soa.esb.services.jbpm.integration.timer;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.JbpmException;
-import org.jbpm.db.JobSession;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.graph.exe.Token;
-import org.jbpm.job.Job;
-import org.jbpm.job.Timer;
-import org.jbpm.scheduler.SchedulerService;
-import org.quartz.JobDataMap;
-import org.quartz.JobDetail;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.SimpleTrigger;
-import org.quartz.Trigger;
-
-/**
- * Implementation of the jBPM scheduler service targeting quartz.
- *
- * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class QuartzSchedulerService implements SchedulerService
-{
- /**
- * Serial Version UID for this class.
- */
- private static final long serialVersionUID = -5573189923313779260L;
-
- private static final String JBPM_GROUP = "jBPMGroup" ;
- private static final String TIMER_ID = "id" ;
-
- private final Scheduler scheduler ;
- private final JobSession jobSession ;
-
- public QuartzSchedulerService(final JbpmContext jbpmContext, final Scheduler scheduler)
- {
- this.scheduler = scheduler ;
- jobSession = jbpmContext.getJobSession();
- }
-
- public void createTimer(final Timer timer)
- {
- final String name = getTimerName(timer) ;
- final Trigger trigger = new SimpleTrigger(name, JBPM_GROUP, timer.getDueDate()) ;
- final JobDetail jobDetail = new JobDetail(name, JBPM_GROUP, QuartzSchedulerServiceJob.class) ;
-
- final JobDataMap jobDataMap = new JobDataMap() ;
- jobDataMap.put(TIMER_ID, new Long(timer.getId())) ;
- jobDetail.setJobDataMap(jobDataMap) ;
-
- try
- {
- scheduler.scheduleJob(jobDetail, trigger) ;
- }
-
- catch (final SchedulerException se)
- {
- throw new JbpmException("Failed to schedule quartz job", se) ;
- }
- jobSession.saveJob(timer) ;
- }
-
- public void deleteTimer(final Timer timer)
- {
- deleteJob(timer) ;
- jobSession.deleteJob(timer) ;
- }
-
- public void deleteTimersByName(final String timerName, final Token token)
- {
- final List<Job> jobs = jobSession.findJobsByToken(token) ;
- if (jobs != null)
- {
- for(Job job: jobs)
- {
- if (job instanceof Timer)
- {
- final Timer timer = (Timer)job ;
- if (timerName.equals(timer.getName()))
- {
- deleteJob(timer) ;
- }
- }
- }
- }
- jobSession.deleteTimersByName(timerName, token) ;
- }
-
- public void deleteTimersByProcessInstance(final ProcessInstance processInstance)
- {
- final List<?> tokens = processInstance.findAllTokens() ;
- if (tokens != null)
- {
- final Iterator<?> tokenIter = tokens.iterator() ;
- while(tokenIter.hasNext())
- {
- final Token token = (Token)tokenIter.next();
- final List<Job> jobs = jobSession.findJobsByToken(token) ;
- if (jobs != null)
- {
- for(Job job: jobs)
- {
- if (job instanceof Timer)
- {
- final Timer timer = (Timer)job ;
- deleteJob(timer) ;
- }
- }
- }
- }
- }
- jobSession.deleteJobsForProcessInstance(processInstance) ;
- }
-
- public void close()
- {
- }
-
- private String getTimerName(final Timer timer)
- {
- return Long.toString(timer.getId()) ;
- }
-
- private void deleteJob(final Timer timer)
- {
- try
- {
- scheduler.deleteJob(getTimerName(timer), JBPM_GROUP) ;
- }
- catch (final SchedulerException se)
- {
- throw new JbpmException("Failed to delete quartz job", se) ;
- }
- }
-
- private static final class QuartzSchedulerServiceJob implements org.quartz.Job
- {
- private static final Logger LOGGER = Logger.getLogger(QuartzSchedulerServiceJob.class) ;
-
- public void execute(final JobExecutionContext context)
- throws JobExecutionException
- {
- final JobDetail jobDetail = context.getJobDetail() ;
- if (jobDetail != null)
- {
- final JobDataMap jobDataMap = jobDetail.getJobDataMap() ;
- if (jobDataMap != null)
- {
- final Long jobId = (Long) jobDataMap.get(TIMER_ID) ;
- if (jobId != null)
- {
- final JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext() ;
- try
- {
- final Job job = jbpmContext.getJobSession().loadJob(jobId) ;
- if (job != null)
- {
- jbpmContext.getServices().getMessageService().send(job) ;
- if (LOGGER.isDebugEnabled())
- {
- LOGGER.debug("Firing job " + jobId) ;
- }
- return ;
- }
- }
- finally
- {
- jbpmContext.close() ;
- }
- }
- }
- }
- if (LOGGER.isDebugEnabled())
- {
- LOGGER.debug("Failed to locate job from context " + context) ;
- }
- }
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerService.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,243 @@
+package org.jboss.soa.esb.services.jbpm.integration.timer;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
+import org.jbpm.db.JobSession;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.job.Job;
+import org.jbpm.job.Timer;
+import org.jbpm.scheduler.SchedulerService;
+import org.quartz.JobDataMap;
+import org.quartz.JobDetail;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.SimpleTrigger;
+import org.quartz.Trigger;
+
+/**
+ * Implementation of the jBPM scheduler service targeting quartz.
+ *
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class QuartzSchedulerService implements SchedulerService
+{
+ /**
+ * Serial Version UID for this class.
+ */
+ private static final long serialVersionUID = -5573189923313779260L;
+
+ /**
+ * Quartz group name for jBPM tasks.
+ */
+ private static final String JBPM_GROUP = "jBPMGroup" ;
+ /**
+ * Name of the timer id within the quartz map.
+ */
+ private static final String TIMER_ID = "id" ;
+
+ /**
+ * The associated quartz scheduler.
+ */
+ private final Scheduler scheduler ;
+ /**
+ * The associated jBPM job session.
+ */
+ private final JobSession jobSession ;
+
+ /**
+ * Create the scheduler service.
+ * @param jbpmContext The associated jBPM context.
+ * @param scheduler The quartz scheduler.
+ */
+ public QuartzSchedulerService(final JbpmContext jbpmContext, final Scheduler scheduler)
+ {
+ this.scheduler = scheduler ;
+ jobSession = jbpmContext.getJobSession();
+ }
+
+ /**
+ * Create a timer.
+ * @param timer the timer to create.
+ */
+ public void createTimer(final Timer timer)
+ {
+ final String name = getTimerName(timer) ;
+ final Trigger trigger = new SimpleTrigger(name, JBPM_GROUP, timer.getDueDate()) ;
+ final JobDetail jobDetail = new JobDetail(name, JBPM_GROUP, QuartzSchedulerServiceJob.class) ;
+
+ final JobDataMap jobDataMap = new JobDataMap() ;
+ jobDataMap.put(TIMER_ID, new Long(timer.getId())) ;
+ jobDetail.setJobDataMap(jobDataMap) ;
+
+ try
+ {
+ scheduler.scheduleJob(jobDetail, trigger) ;
+ }
+
+ catch (final SchedulerException se)
+ {
+ throw new JbpmException("Failed to schedule quartz job", se) ;
+ }
+ jobSession.saveJob(timer) ;
+ }
+
+ /**
+ * Delete a specific timer.
+ * @param timer The timer to delete.
+ */
+ public void deleteTimer(final Timer timer)
+ {
+ deleteJob(timer) ;
+ jobSession.deleteJob(timer) ;
+ }
+
+ /**
+ * Delete a specific timer given a name and associated jBPM token.
+ * @param timerName The name of the timer to delete.
+ * @param token The token associated with the timer.
+ */
+ public void deleteTimersByName(final String timerName, final Token token)
+ {
+ final List<Job> jobs = jobSession.findJobsByToken(token) ;
+ if (jobs != null)
+ {
+ for(Job job: jobs)
+ {
+ if (job instanceof Timer)
+ {
+ final Timer timer = (Timer)job ;
+ if (timerName.equals(timer.getName()))
+ {
+ deleteJob(timer) ;
+ }
+ }
+ }
+ }
+ jobSession.deleteTimersByName(timerName, token) ;
+ }
+
+ /**
+ * Delete timers associated with a jBPM process instance.
+ * @param processInstance The process instance associated with the timers.
+ */
+ public void deleteTimersByProcessInstance(final ProcessInstance processInstance)
+ {
+ final List<?> tokens = processInstance.findAllTokens() ;
+ if (tokens != null)
+ {
+ final Iterator<?> tokenIter = tokens.iterator() ;
+ while(tokenIter.hasNext())
+ {
+ final Token token = (Token)tokenIter.next();
+ final List<Job> jobs = jobSession.findJobsByToken(token) ;
+ if (jobs != null)
+ {
+ for(Job job: jobs)
+ {
+ if (job instanceof Timer)
+ {
+ final Timer timer = (Timer)job ;
+ deleteJob(timer) ;
+ }
+ }
+ }
+ }
+ }
+ jobSession.deleteJobsForProcessInstance(processInstance) ;
+ }
+
+ /**
+ * Close the scheduler service.
+ */
+ public void close()
+ {
+ }
+
+ /**
+ * Generate a name for the timer.
+ * @param timer the timer.
+ */
+ private String getTimerName(final Timer timer)
+ {
+ return Long.toString(timer.getId()) ;
+ }
+
+ /**
+ * Delete a quartz job associated with a timer.
+ * @param The timer to delete.
+ */
+ private void deleteJob(final Timer timer)
+ {
+ try
+ {
+ scheduler.deleteJob(getTimerName(timer), JBPM_GROUP) ;
+ }
+ catch (final SchedulerException se)
+ {
+ throw new JbpmException("Failed to delete quartz job", se) ;
+ }
+ }
+
+ /**
+ * The quartz job associated with executing a jBPM timer.
+ * @author kevin
+ */
+ private static final class QuartzSchedulerServiceJob implements org.quartz.Job
+ {
+ /**
+ * The logger for this class.
+ */
+ private static final Logger LOGGER = Logger.getLogger(QuartzSchedulerServiceJob.class) ;
+
+ /**
+ * Execute the quartz job.
+ * @param context The quartz execution context.
+ */
+ public void execute(final JobExecutionContext context)
+ throws JobExecutionException
+ {
+ final JobDetail jobDetail = context.getJobDetail() ;
+ if (jobDetail != null)
+ {
+ final JobDataMap jobDataMap = jobDetail.getJobDataMap() ;
+ if (jobDataMap != null)
+ {
+ final Long jobId = (Long) jobDataMap.get(TIMER_ID) ;
+ if (jobId != null)
+ {
+ final JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext() ;
+ try
+ {
+ final Job job = jbpmContext.getJobSession().loadJob(jobId) ;
+ if (job != null)
+ {
+ jbpmContext.getServices().getMessageService().send(job) ;
+ if (LOGGER.isDebugEnabled())
+ {
+ LOGGER.debug("Firing job " + jobId) ;
+ }
+ return ;
+ }
+ }
+ finally
+ {
+ jbpmContext.close() ;
+ }
+ }
+ }
+ }
+ if (LOGGER.isDebugEnabled())
+ {
+ LOGGER.debug("Failed to locate job from context " + context) ;
+ }
+ }
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,134 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.jbpm.integration.timer;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import org.jboss.soa.esb.util.ClassUtil;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmException;
-import org.jbpm.svc.Service;
-import org.jbpm.svc.ServiceFactory;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.impl.StdSchedulerFactory;
-
-/**
- * Implementation of a scheduler service using quartz.
- */
-public class QuartzSchedulerServiceFactory implements ServiceFactory
-{
- /**
- * Serial version uid for this class.
- */
- private static final long serialVersionUID = -854771628720741785L;
- /**
- * The instance name property.
- */
- public static final String INSTANCE_NAME = "org.quartz.scheduler.instanceName" ;
- /**
- * The thread name property.
- */
- public static final String THREAD_NAME = "org.quartz.scheduler.threadName" ;
- /**
- * The thread count property.
- */
- public static final String THREAD_COUNT = "org.quartz.threadPool.threadCount" ;
-
- /**
- * Quartz configuration.
- */
- String quartzConfiguration = "jbpm-quartz.properties" ;
- /**
- * The quartz scheduler associated with this factory.
- */
- private Scheduler scheduler ;
-
- public QuartzSchedulerServiceFactory()
- throws JbpmException
- {
- final InputStream quartzProperties = ClassUtil.getResourceAsStream("/" + quartzConfiguration, getClass()) ;
-
- if(quartzProperties == null)
- {
- throw new JbpmException("Failed to locate the default scheduling properties") ;
- }
-
- final Properties properties = new Properties();
- try
- {
- properties.load(quartzProperties) ;
- }
- catch (final IOException ioe)
- {
- throw new JbpmException("Failed to load the default scheduling properties") ;
- }
-
- final String name = "JbpmSchedulerService" ;
- properties.put(INSTANCE_NAME, name) ;
- properties.put(THREAD_NAME, name) ;
- if (!properties.containsKey(THREAD_COUNT))
- {
- properties.put(THREAD_COUNT, "1") ;
- }
- final Scheduler scheduler ;
- try
- {
- scheduler = new StdSchedulerFactory(properties).getScheduler();
- scheduler.start() ;
- }
- catch (final SchedulerException se)
- {
- throw new JbpmException("Failed to initialise the scheduler", se) ;
- }
- this.scheduler = scheduler ;
- }
-
- public Service openService()
- {
- return new QuartzSchedulerService(JbpmConfiguration.getInstance().getCurrentJbpmContext(), scheduler) ;
- }
-
- public void close()
- {
- if (scheduler != null)
- {
- try
- {
- if (!scheduler.isShutdown())
- {
- scheduler.shutdown() ;
- }
- }
- catch (final SchedulerException se)
- {
- throw new JbpmException("Failed to shutdown scheduler", se) ;
- }
- finally
- {
- scheduler = null ;
- }
- }
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/QuartzSchedulerServiceFactory.java 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.timer;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.jboss.soa.esb.util.ClassUtil;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmException;
+import org.jbpm.svc.Service;
+import org.jbpm.svc.ServiceFactory;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.impl.StdSchedulerFactory;
+
+/**
+ * Implementation of a scheduler service using quartz.
+ */
+public class QuartzSchedulerServiceFactory implements ServiceFactory
+{
+ /**
+ * Serial version uid for this class.
+ */
+ private static final long serialVersionUID = -854771628720741785L;
+ /**
+ * The instance name property.
+ */
+ public static final String INSTANCE_NAME = "org.quartz.scheduler.instanceName" ;
+ /**
+ * The thread name property.
+ */
+ public static final String THREAD_NAME = "org.quartz.scheduler.threadName" ;
+ /**
+ * The thread count property.
+ */
+ public static final String THREAD_COUNT = "org.quartz.threadPool.threadCount" ;
+
+ /**
+ * Quartz configuration.
+ */
+ String quartzConfiguration = "jbpm-quartz.properties" ;
+ /**
+ * The quartz scheduler associated with this factory.
+ */
+ private Scheduler scheduler ;
+
+ /**
+ * Construct the quartz scheduler service factory.
+ * @throws JbpmException For errors during construction.
+ */
+ public QuartzSchedulerServiceFactory()
+ throws JbpmException
+ {
+ final InputStream quartzProperties = ClassUtil.getResourceAsStream("/" + quartzConfiguration, getClass()) ;
+
+ if(quartzProperties == null)
+ {
+ throw new JbpmException("Failed to locate the default scheduling properties") ;
+ }
+
+ final Properties properties = new Properties();
+ try
+ {
+ properties.load(quartzProperties) ;
+ }
+ catch (final IOException ioe)
+ {
+ throw new JbpmException("Failed to load the default scheduling properties") ;
+ }
+
+ final String name = "JbpmSchedulerService" ;
+ properties.put(INSTANCE_NAME, name) ;
+ properties.put(THREAD_NAME, name) ;
+ if (!properties.containsKey(THREAD_COUNT))
+ {
+ properties.put(THREAD_COUNT, "1") ;
+ }
+ final Scheduler scheduler ;
+ try
+ {
+ scheduler = new StdSchedulerFactory(properties).getScheduler();
+ scheduler.start() ;
+ }
+ catch (final SchedulerException se)
+ {
+ throw new JbpmException("Failed to initialise the scheduler", se) ;
+ }
+ this.scheduler = scheduler ;
+ }
+
+ /**
+ * Create an instance of the scheduler service.
+ */
+ public Service openService()
+ {
+ return new QuartzSchedulerService(JbpmConfiguration.getInstance().getCurrentJbpmContext(), scheduler) ;
+ }
+
+ /**
+ * Close the service factory.
+ */
+ public void close()
+ {
+ if (scheduler != null)
+ {
+ try
+ {
+ if (!scheduler.isShutdown())
+ {
+ scheduler.shutdown() ;
+ }
+ }
+ catch (final SchedulerException se)
+ {
+ throw new JbpmException("Failed to shutdown scheduler", se) ;
+ }
+ finally
+ {
+ scheduler = null ;
+ }
+ }
+ }
+}
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbm-queue-service.xml 2009-06-25 14:41:27 UTC (rev 27130)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbm-queue-service.xml 2009-06-25 14:46:50 UTC (rev 27131)
@@ -5,4 +5,21 @@
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
</mbean>
+ <!-- JMS message service ==>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.destination:service=Queue,name=JbpmJobQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.destination:service=Queue,name=JbpmCommandQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.destination:service=Queue,name=JbpmDLQ"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <!== End of JMS message service -->
</server>
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbmq-queue-service.xml 2009-06-25 14:41:27 UTC (rev 27130)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbmq-queue-service.xml 2009-06-25 14:46:50 UTC (rev 27131)
@@ -6,4 +6,24 @@
jboss.mq:service=DestinationManager
</depends>
</mbean>
+ <!-- JMS message service ==>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.destination:service=Queue,name=JbpmJobQueue">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.destination:service=Queue,name=JbpmCommandQueue">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.destination:service=Queue,name=JbpmDLQ">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <!== End of JMS message service -->
</server>
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-quartz.properties (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/jbpm-quartz.properties)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-quartz.properties (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-quartz.properties 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,18 @@
+org.quartz.scheduler.instanceName = JBPMQuartzScheduler
+org.quartz.scheduler.wrapJobExecutionInUserTransaction = true
+org.quartz.scheduler.userTransactionURL=UserTransaction
+org.quartz.scheduler.instanceId = AUTO
+
+org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+org.quartz.threadPool.threadCount = 10
+org.quartz.threadPool.threadPriority = 5
+org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
+
+org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
+org.quartz.jobStore.dataSource=jbpmDS
+org.quartz.jobStore.nonManagedTXDataSource=jbpmDS
+
+#org.quartz.jobStore.isClustered = true
+#org.quartz.jobStore.clusterCheckinInterval = 20000
+
+org.quartz.dataSource.jbpmDS.jndiURL=java:/JbpmDS
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-service.xml 2009-06-25 14:41:27 UTC (rev 27130)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-service.xml 2009-06-25 14:46:50 UTC (rev 27131)
@@ -3,7 +3,19 @@
<server>
<classpath codebase="deploy" archives="jbpm.esb"/>
<classpath codebase="deploy/jbossesb.sar/lib" archives="jbossesb-rosetta.jar"/>
+
+ <!-- quartz initialisation ===
<mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
+ name="jboss.esb:service=JBPMQuartzInitializer">
+ <attribute name="Datasource">java:/JbpmDS</attribute>
+ <attribute name="ExistsSql">select count(*) from QRTZ_JOB_DETAILS</attribute>
+ <attribute name="SqlFiles">
+ quartz-sql/tables_hsqldb.sql
+ </attribute>
+ <depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
+ </mbean>
+ ==== quartz initialisation -->
+ <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
name="jboss.esb:service=JBPMDatabaseInitializer">
<attribute name="Datasource">java:/JbpmDS</attribute>
<attribute name="ExistsSql">select count(*) from JBPM_ID_USER</attribute>
@@ -12,11 +24,53 @@
jbpm-sql/import.sql
</attribute>
<depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
+ <!-- quartz initialisation ===
+ <depends>jboss.esb:service=JBPMQuartzInitializer</depends>
+ ==== quartz initialisation -->
<attribute name="UseEOL">true</attribute>
- </mbean>
+ </mbean>
<mbean code="org.jboss.soa.esb.services.jbpm.configuration.JbpmService"
name="jboss.esb:service=JbpmService">
<depends>jboss.esb:service=JBPMDatabaseInitializer</depends>
+ <!-- JMS message service ==>
+ <depends>jboss.esb.destination:service=Queue,name=JbpmJobQueue</depends>
+ <depends>jboss.esb.destination:service=Queue,name=JbpmCommandQueue</depends>
+ <depends>jboss.esb.destination:service=Queue,name=JbpmDLQ</depends>
+ <!== End of JMS message service -->
</mbean>
+
+ <!-- JMS message service ==>
+ <mbean code="org.jboss.internal.soa.esb.dependencies.JCAInflowAdapter"
+ name="jboss.esb:service=JBPMJobExecutor">
+ <attribute name="BeanType">org.jboss.soa.esb.services.jbpm.integration.command.JobListener</attribute>
+ <attribute name="Adapter">jms-ra.rar</attribute>
+ <attribute name="ActivationSpec">
+ destination=queue/JbpmJobQueue
+ destinationType=javax.xml.Queue
+ </attribute>
+ <!== optional attributes ==>
+ <attribute name="MessagingInterface">javax.jms.MessageListener</attribute>
+ <attribute name="IsTransacted">true</attribute>
+ <attribute name="ActivationBridge">org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge</attribute>
+ <attribute name="Description">jBPM Job Listener inflow</attribute>
+ <depends>jboss.esb.destination:service=Queue,name=JbpmJobQueue</depends>
+ </mbean>
+
+ <mbean code="org.jboss.internal.soa.esb.dependencies.JCAInflowAdapter"
+ name="jboss.esb:service=JBPMCommandExecutor">
+ <attribute name="BeanType">org.jboss.soa.esb.services.jbpm.integration.command.CommandListener</attribute>
+ <attribute name="Adapter">jms-ra.rar</attribute>
+ <attribute name="ActivationSpec">
+ destination=queue/JbpmCommandQueue
+ destinationType=javax.xml.Queue
+ </attribute>
+ <!== optional attributes ==>
+ <attribute name="MessagingInterface">javax.jms.MessageListener</attribute>
+ <attribute name="IsTransacted">true</attribute>
+ <attribute name="ActivationBridge">org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge</attribute>
+ <attribute name="Description">jBPM Command Listener inflow</attribute>
+ <depends>jboss.esb.destination:service=Queue,name=JbpmCommandQueue</depends>
+ </mbean>
+ <!== End of JMS message service -->
</server>
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm.cfg.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm.cfg.xml 2009-06-25 14:41:27 UTC (rev 27130)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm.cfg.xml 2009-06-25 14:46:50 UTC (rev 27131)
@@ -23,6 +23,15 @@
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
+ <!-- JMS message service ==>
+ <service name="message" factory="org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageServiceFactory" />
+ <!== End of JMS message service -->
+ <!-- JMS scheduler ==>
+ <service name="scheduler" factory="org.jboss.soa.esb.services.jbpm.integration.timer.JmsSchedulerServiceFactory"/>
+ <!== End of JMS scheduler -->
+ <!-- quartz scheduler ===
+ <service name="scheduler" factory="org.jboss.soa.esb.services.jbpm.integration.timer.QuartzSchedulerServiceFactory"/>
+ <!== End of Quartz scheduler -->
<service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
<service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
</jbpm-context>
@@ -47,6 +56,7 @@
<bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
<string name="jbpm.mail.from.address" value="jbpm at noreply" />
+ <!-- DB message/scheduler service -->
<bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
<field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
<field name="name"><string value="JbpmJobExector" /></field>
@@ -58,5 +68,9 @@
<field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
<field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
</bean>
+ <!-- End of DB message/scheduler service -->
+ <!-- JMS message service plus JMS/quartz scheduler service ==>
+ <null name="jbpm.job.executor"/>
+ <!== End of JMS message service plus JMS/quartz scheduler service -->
</jbpm-configuration>
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql)
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,134 +0,0 @@
-#
-# Thanks to Srinivas Venkatarangaiah for submitting this file's contents
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.CloudscapeDelegate
-#
-# Known to work with Cloudscape 3.6.4 (should work with others)
-#
-
-
-create table qrtz_job_details (
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- description varchar(120) ,
- job_class_name varchar(128) not null,
- is_durable varchar(5) not null,
- is_volatile varchar(5) not null,
- is_stateful varchar(5) not null,
- requests_recovery varchar(5) not null,
- job_data long varbinary,
-primary key (job_name,job_group)
-);
-
-create table qrtz_job_listeners(
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- job_listener varchar(80) not null,
-primary key (job_name,job_group,job_listener),
-foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- is_volatile varchar(5) not null,
- description varchar(120) ,
- next_fire_time longint,
- prev_fire_time longint,
- trigger_state varchar(16) not null,
- trigger_type varchar(8) not null,
- start_time longint not null,
- end_time longint,
- calendar_name varchar(80),
- misfire_instr smallint,
- job_data long varbinary,
-primary key (trigger_name,trigger_group),
-foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_simple_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- repeat_count longint not null,
- repeat_interval longint not null,
- times_triggered longint not null,
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_cron_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- cron_expression varchar(80) not null,
- time_zone_id varchar(80),
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_blob_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- blob_data long varbinary ,
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_trigger_listeners(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- trigger_listener varchar(80) not null,
-primary key (trigger_name,trigger_group,trigger_listener),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_calendars(
- calendar_name varchar(80) not null,
- calendar long varbinary not null,
-primary key (calendar_name)
-);
-
-create table qrtz_paused_trigger_grps
- (
- trigger_group varchar(80) not null,
-primary key (trigger_group)
-);
-
-create table qrtz_fired_triggers(
- entry_id varchar(95) not null,
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- is_volatile varchar(5) not null,
- instance_name varchar(80) not null,
- fired_time longint not null,
- state varchar(16) not null,
- job_name varchar(80) null,
- job_group varchar(80) null,
- is_stateful varchar(5) null,
- requests_recovery varchar(5) null,
-primary key (entry_id)
-);
-
-create table qrtz_scheduler_state
- (
- instance_name varchar(80) not null,
- last_checkin_time longint not null,
- checkin_interval longint not null,
- recoverer varchar(80) null,
-primary key (instance_name)
-);
-
-create table qrtz_locks
- (
- lock_name varchar(40) not null,
-primary key (lock_name)
-);
-
-insert into qrtz_locks values('TRIGGER_ACCESS');
-insert into qrtz_locks values('JOB_ACCESS');
-insert into qrtz_locks values('CALENDAR_ACCESS');
-insert into qrtz_locks values('STATE_ACCESS');
-insert into qrtz_locks values('MISFIRE_ACCESS');
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_cloudscape.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,134 @@
+#
+# Thanks to Srinivas Venkatarangaiah for submitting this file's contents
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.CloudscapeDelegate
+#
+# Known to work with Cloudscape 3.6.4 (should work with others)
+#
+
+
+create table qrtz_job_details (
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ description varchar(120) ,
+ job_class_name varchar(128) not null,
+ is_durable varchar(5) not null,
+ is_volatile varchar(5) not null,
+ is_stateful varchar(5) not null,
+ requests_recovery varchar(5) not null,
+ job_data long varbinary,
+primary key (job_name,job_group)
+);
+
+create table qrtz_job_listeners(
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ job_listener varchar(80) not null,
+primary key (job_name,job_group,job_listener),
+foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ is_volatile varchar(5) not null,
+ description varchar(120) ,
+ next_fire_time longint,
+ prev_fire_time longint,
+ trigger_state varchar(16) not null,
+ trigger_type varchar(8) not null,
+ start_time longint not null,
+ end_time longint,
+ calendar_name varchar(80),
+ misfire_instr smallint,
+ job_data long varbinary,
+primary key (trigger_name,trigger_group),
+foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_simple_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ repeat_count longint not null,
+ repeat_interval longint not null,
+ times_triggered longint not null,
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_cron_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ cron_expression varchar(80) not null,
+ time_zone_id varchar(80),
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_blob_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ blob_data long varbinary ,
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_trigger_listeners(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ trigger_listener varchar(80) not null,
+primary key (trigger_name,trigger_group,trigger_listener),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_calendars(
+ calendar_name varchar(80) not null,
+ calendar long varbinary not null,
+primary key (calendar_name)
+);
+
+create table qrtz_paused_trigger_grps
+ (
+ trigger_group varchar(80) not null,
+primary key (trigger_group)
+);
+
+create table qrtz_fired_triggers(
+ entry_id varchar(95) not null,
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ is_volatile varchar(5) not null,
+ instance_name varchar(80) not null,
+ fired_time longint not null,
+ state varchar(16) not null,
+ job_name varchar(80) null,
+ job_group varchar(80) null,
+ is_stateful varchar(5) null,
+ requests_recovery varchar(5) null,
+primary key (entry_id)
+);
+
+create table qrtz_scheduler_state
+ (
+ instance_name varchar(80) not null,
+ last_checkin_time longint not null,
+ checkin_interval longint not null,
+ recoverer varchar(80) null,
+primary key (instance_name)
+);
+
+create table qrtz_locks
+ (
+ lock_name varchar(40) not null,
+primary key (lock_name)
+);
+
+insert into qrtz_locks values('TRIGGER_ACCESS');
+insert into qrtz_locks values('JOB_ACCESS');
+insert into qrtz_locks values('CALENDAR_ACCESS');
+insert into qrtz_locks values('STATE_ACCESS');
+insert into qrtz_locks values('MISFIRE_ACCESS');
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,141 +0,0 @@
-#
-# Thanks to Horia Muntean for submitting this....
-#
-# .. known to work with DB2 7.1 and the JDBC driver "COM.ibm.db2.jdbc.net.DB2Driver"
-# .. likely to work with others...
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-# If you're using DB2 6.x you'll want to set this property to
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.DB2v6Delegate
-#
-# Note that the blob column size (e.g. blob(2000)) dictates the amount of data that can be stored in
-# that blob - i.e. limits the amount of data you can put into your JobDataMap
-#
-
-
-create table qrtz_job_details (
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- description varchar(120) null,
- job_class_name varchar(128) not null,
- is_durable varchar(1) not null,
- is_volatile varchar(1) not null,
- is_stateful varchar(1) not null,
- requests_recovery varchar(1) not null,
- job_data blob(2000),
- primary key (job_name,job_group)
-)
-
-create table qrtz_job_listeners(
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- job_listener varchar(80) not null,
- primary key (job_name,job_group,job_listener),
- foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-)
-
-create table qrtz_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- is_volatile varchar(1) not null,
- description varchar(120) null,
- next_fire_time bigint,
- prev_fire_time bigint,
- trigger_state varchar(16) not null,
- trigger_type varchar(8) not null,
- start_time bigint not null,
- end_time bigint,
- calendar_name varchar(80),
- misfire_instr smallint,
- job_data blob(2000),
- primary key (trigger_name,trigger_group),
- foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-)
-
-create table qrtz_simple_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- repeat_count bigint not null,
- repeat_interval bigint not null,
- times_triggered bigint not null,
- primary key (trigger_name,trigger_group),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-)
-
-create table qrtz_cron_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- cron_expression varchar(80) not null,
- time_zone_id varchar(80),
- primary key (trigger_name,trigger_group),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-)
-
-create table qrtz_blob_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- blob_data blob(2000) null,
- primary key (trigger_name,trigger_group),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-)
-
-create table qrtz_trigger_listeners(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- trigger_listener varchar(80) not null,
- primary key (trigger_name,trigger_group,trigger_listener),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-)
-
-create table qrtz_calendars(
- calendar_name varchar(80) not null,
- calendar blob(2000) not null,
- primary key (calendar_name)
-)
-
-create table qrtz_fired_triggers(
- entry_id varchar(95) not null,
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- is_volatile varchar(1) not null,
- instance_name varchar(80) not null,
- fired_time bigint not null,
- state varchar(16) not null,
- job_name varchar(80) null,
- job_group varchar(80) null,
- is_stateful varchar(1) null,
- requests_recovery varchar(1) null,
- primary key (entry_id)
-);
-
-
-create table qrtz_paused_trigger_grps(
- trigger_group varchar(80) not null,
- primary key (trigger_group)
-);
-
-create table qrtz_scheduler_state (
- instance_name varchar(80) not null,
- last_checkin_time bigint not null,
- checkin_interval bigint not null,
- recoverer varchar(80) null,
- primary key (instance_name)
-);
-
-create table qrtz_locks
- (
- lock_name varchar(40) not null,
- primary key (lock_name)
-);
-
-insert into qrtz_locks values('TRIGGER_ACCESS');
-insert into qrtz_locks values('JOB_ACCESS');
-insert into qrtz_locks values('CALENDAR_ACCESS');
-insert into qrtz_locks values('STATE_ACCESS');
-insert into qrtz_locks values('MISFIRE_ACCESS');
-
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,141 @@
+#
+# Thanks to Horia Muntean for submitting this....
+#
+# .. known to work with DB2 7.1 and the JDBC driver "COM.ibm.db2.jdbc.net.DB2Driver"
+# .. likely to work with others...
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+# If you're using DB2 6.x you'll want to set this property to
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.DB2v6Delegate
+#
+# Note that the blob column size (e.g. blob(2000)) dictates the amount of data that can be stored in
+# that blob - i.e. limits the amount of data you can put into your JobDataMap
+#
+
+
+create table qrtz_job_details (
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ description varchar(120) null,
+ job_class_name varchar(128) not null,
+ is_durable varchar(1) not null,
+ is_volatile varchar(1) not null,
+ is_stateful varchar(1) not null,
+ requests_recovery varchar(1) not null,
+ job_data blob(2000),
+ primary key (job_name,job_group)
+)
+
+create table qrtz_job_listeners(
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ job_listener varchar(80) not null,
+ primary key (job_name,job_group,job_listener),
+ foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+)
+
+create table qrtz_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ is_volatile varchar(1) not null,
+ description varchar(120) null,
+ next_fire_time bigint,
+ prev_fire_time bigint,
+ trigger_state varchar(16) not null,
+ trigger_type varchar(8) not null,
+ start_time bigint not null,
+ end_time bigint,
+ calendar_name varchar(80),
+ misfire_instr smallint,
+ job_data blob(2000),
+ primary key (trigger_name,trigger_group),
+ foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+)
+
+create table qrtz_simple_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ repeat_count bigint not null,
+ repeat_interval bigint not null,
+ times_triggered bigint not null,
+ primary key (trigger_name,trigger_group),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+)
+
+create table qrtz_cron_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ cron_expression varchar(80) not null,
+ time_zone_id varchar(80),
+ primary key (trigger_name,trigger_group),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+)
+
+create table qrtz_blob_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ blob_data blob(2000) null,
+ primary key (trigger_name,trigger_group),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+)
+
+create table qrtz_trigger_listeners(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ trigger_listener varchar(80) not null,
+ primary key (trigger_name,trigger_group,trigger_listener),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+)
+
+create table qrtz_calendars(
+ calendar_name varchar(80) not null,
+ calendar blob(2000) not null,
+ primary key (calendar_name)
+)
+
+create table qrtz_fired_triggers(
+ entry_id varchar(95) not null,
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ is_volatile varchar(1) not null,
+ instance_name varchar(80) not null,
+ fired_time bigint not null,
+ state varchar(16) not null,
+ job_name varchar(80) null,
+ job_group varchar(80) null,
+ is_stateful varchar(1) null,
+ requests_recovery varchar(1) null,
+ primary key (entry_id)
+);
+
+
+create table qrtz_paused_trigger_grps(
+ trigger_group varchar(80) not null,
+ primary key (trigger_group)
+);
+
+create table qrtz_scheduler_state (
+ instance_name varchar(80) not null,
+ last_checkin_time bigint not null,
+ checkin_interval bigint not null,
+ recoverer varchar(80) null,
+ primary key (instance_name)
+);
+
+create table qrtz_locks
+ (
+ lock_name varchar(40) not null,
+ primary key (lock_name)
+);
+
+insert into qrtz_locks values('TRIGGER_ACCESS');
+insert into qrtz_locks values('JOB_ACCESS');
+insert into qrtz_locks values('CALENDAR_ACCESS');
+insert into qrtz_locks values('STATE_ACCESS');
+insert into qrtz_locks values('MISFIRE_ACCESS');
+
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,156 +0,0 @@
---
--- Thanks to Horia Muntean for submitting this, Mikkel Heisterberg for updating it
---
--- .. known to work with DB2 7.2 and the JDBC driver "COM.ibm.db2.jdbc.net.DB2Driver"
--- .. likely to work with others...
---
--- In your Quartz properties file, you'll need to set
--- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.DB2v7Delegate
---
--- or
---
--- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
---
--- If you're using DB2 6.x you'll want to set this property to
--- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.DB2v6Delegate
---
--- Note that the blob column size (e.g. blob(2000)) dictates the amount of data that can be stored in
--- that blob - i.e. limits the amount of data you can put into your JobDataMap
---
-
-DROP TABLE QRTZ_JOB_LISTENERS;
-DROP TABLE QRTZ_TRIGGER_LISTENERS;
-DROP TABLE QRTZ_FIRED_TRIGGERS;
-DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE QRTZ_SCHEDULER_STATE;
-DROP TABLE QRTZ_LOCKS;
-DROP TABLE QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE QRTZ_CRON_TRIGGERS;
-DROP TABLE QRTZ_TRIGGERS;
-DROP TABLE QRTZ_JOB_DETAILS;
-DROP TABLE QRTZ_CALENDARS;
-DROP TABLE QRTZ_BLOB_TRIGGERS;
-
-create table qrtz_job_details (
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- description varchar(120),
- job_class_name varchar(128) not null,
- is_durable varchar(1) not null,
- is_volatile varchar(1) not null,
- is_stateful varchar(1) not null,
- requests_recovery varchar(1) not null,
- job_data blob(2000),
- primary key (job_name,job_group)
-);
-
-create table qrtz_job_listeners(
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- job_listener varchar(80) not null,
- primary key (job_name,job_group,job_listener),
- foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- job_name varchar(80) not null,
- job_group varchar(80) not null,
- is_volatile varchar(1) not null,
- description varchar(120),
- next_fire_time bigint,
- prev_fire_time bigint,
- trigger_state varchar(16) not null,
- trigger_type varchar(8) not null,
- start_time bigint not null,
- end_time bigint,
- calendar_name varchar(80),
- misfire_instr smallint,
- job_data blob(2000),
- primary key (trigger_name,trigger_group),
- foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_simple_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- repeat_count bigint not null,
- repeat_interval bigint not null,
- times_triggered bigint not null,
- primary key (trigger_name,trigger_group),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_cron_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- cron_expression varchar(80) not null,
- time_zone_id varchar(80),
- primary key (trigger_name,trigger_group),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_blob_triggers(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- blob_data blob(2000),
- primary key (trigger_name,trigger_group),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_trigger_listeners(
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- trigger_listener varchar(80) not null,
- primary key (trigger_name,trigger_group,trigger_listener),
- foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_calendars(
- calendar_name varchar(80) not null,
- calendar blob(2000) not null,
- primary key (calendar_name)
-);
-
-create table qrtz_fired_triggers(
- entry_id varchar(95) not null,
- trigger_name varchar(80) not null,
- trigger_group varchar(80) not null,
- is_volatile varchar(1) not null,
- instance_name varchar(80) not null,
- fired_time bigint not null,
- state varchar(16) not null,
- job_name varchar(80),
- job_group varchar(80),
- is_stateful varchar(1),
- requests_recovery varchar(1),
- primary key (entry_id)
-);
-
-
-create table qrtz_paused_trigger_grps(
- trigger_group varchar(80) not null,
- primary key (trigger_group)
-);
-
-create table qrtz_scheduler_state (
- instance_name varchar(80) not null,
- last_checkin_time bigint not null,
- checkin_interval bigint not null,
- recoverer varchar(80),
- primary key (instance_name)
-);
-
-create table qrtz_locks
- (
- lock_name varchar(40) not null,
- primary key (lock_name)
-);
-
-insert into qrtz_locks values('TRIGGER_ACCESS');
-insert into qrtz_locks values('JOB_ACCESS');
-insert into qrtz_locks values('CALENDAR_ACCESS');
-insert into qrtz_locks values('STATE_ACCESS');
-insert into qrtz_locks values('MISFIRE_ACCESS');
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v72.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,156 @@
+--
+-- Thanks to Horia Muntean for submitting this, Mikkel Heisterberg for updating it
+--
+-- .. known to work with DB2 7.2 and the JDBC driver "COM.ibm.db2.jdbc.net.DB2Driver"
+-- .. likely to work with others...
+--
+-- In your Quartz properties file, you'll need to set
+-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.DB2v7Delegate
+--
+-- or
+--
+-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+--
+-- If you're using DB2 6.x you'll want to set this property to
+-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.DB2v6Delegate
+--
+-- Note that the blob column size (e.g. blob(2000)) dictates the amount of data that can be stored in
+-- that blob - i.e. limits the amount of data you can put into your JobDataMap
+--
+
+DROP TABLE QRTZ_JOB_LISTENERS;
+DROP TABLE QRTZ_TRIGGER_LISTENERS;
+DROP TABLE QRTZ_FIRED_TRIGGERS;
+DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE QRTZ_SCHEDULER_STATE;
+DROP TABLE QRTZ_LOCKS;
+DROP TABLE QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE QRTZ_CRON_TRIGGERS;
+DROP TABLE QRTZ_TRIGGERS;
+DROP TABLE QRTZ_JOB_DETAILS;
+DROP TABLE QRTZ_CALENDARS;
+DROP TABLE QRTZ_BLOB_TRIGGERS;
+
+create table qrtz_job_details (
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ description varchar(120),
+ job_class_name varchar(128) not null,
+ is_durable varchar(1) not null,
+ is_volatile varchar(1) not null,
+ is_stateful varchar(1) not null,
+ requests_recovery varchar(1) not null,
+ job_data blob(2000),
+ primary key (job_name,job_group)
+);
+
+create table qrtz_job_listeners(
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ job_listener varchar(80) not null,
+ primary key (job_name,job_group,job_listener),
+ foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ job_name varchar(80) not null,
+ job_group varchar(80) not null,
+ is_volatile varchar(1) not null,
+ description varchar(120),
+ next_fire_time bigint,
+ prev_fire_time bigint,
+ trigger_state varchar(16) not null,
+ trigger_type varchar(8) not null,
+ start_time bigint not null,
+ end_time bigint,
+ calendar_name varchar(80),
+ misfire_instr smallint,
+ job_data blob(2000),
+ primary key (trigger_name,trigger_group),
+ foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_simple_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ repeat_count bigint not null,
+ repeat_interval bigint not null,
+ times_triggered bigint not null,
+ primary key (trigger_name,trigger_group),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_cron_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ cron_expression varchar(80) not null,
+ time_zone_id varchar(80),
+ primary key (trigger_name,trigger_group),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_blob_triggers(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ blob_data blob(2000),
+ primary key (trigger_name,trigger_group),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_trigger_listeners(
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ trigger_listener varchar(80) not null,
+ primary key (trigger_name,trigger_group,trigger_listener),
+ foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_calendars(
+ calendar_name varchar(80) not null,
+ calendar blob(2000) not null,
+ primary key (calendar_name)
+);
+
+create table qrtz_fired_triggers(
+ entry_id varchar(95) not null,
+ trigger_name varchar(80) not null,
+ trigger_group varchar(80) not null,
+ is_volatile varchar(1) not null,
+ instance_name varchar(80) not null,
+ fired_time bigint not null,
+ state varchar(16) not null,
+ job_name varchar(80),
+ job_group varchar(80),
+ is_stateful varchar(1),
+ requests_recovery varchar(1),
+ primary key (entry_id)
+);
+
+
+create table qrtz_paused_trigger_grps(
+ trigger_group varchar(80) not null,
+ primary key (trigger_group)
+);
+
+create table qrtz_scheduler_state (
+ instance_name varchar(80) not null,
+ last_checkin_time bigint not null,
+ checkin_interval bigint not null,
+ recoverer varchar(80),
+ primary key (instance_name)
+);
+
+create table qrtz_locks
+ (
+ lock_name varchar(40) not null,
+ primary key (lock_name)
+);
+
+insert into qrtz_locks values('TRIGGER_ACCESS');
+insert into qrtz_locks values('JOB_ACCESS');
+insert into qrtz_locks values('CALENDAR_ACCESS');
+insert into qrtz_locks values('STATE_ACCESS');
+insert into qrtz_locks values('MISFIRE_ACCESS');
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,143 +0,0 @@
-#
-# Updated by Claudiu Crisan (claudiu.crisan at schartner.net)
-# SQL scripts for DB2 ver 8.1
-#
-# Changes:
-# - "varchar(1)" replaced with "integer"
-# - "field_name varchar(xxx) not null" replaced with "field_name varchar(xxx)"
-#
-
-
-DROP TABLE QRTZ_JOB_LISTENERS;
-DROP TABLE QRTZ_TRIGGER_LISTENERS;
-DROP TABLE QRTZ_FIRED_TRIGGERS;
-DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE QRTZ_SCHEDULER_STATE;
-DROP TABLE QRTZ_LOCKS;
-DROP TABLE QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE QRTZ_CRON_TRIGGERS;
-DROP TABLE QRTZ_TRIGGERS;
-DROP TABLE QRTZ_JOB_DETAILS;
-DROP TABLE QRTZ_CALENDARS;
-DROP TABLE QRTZ_BLOB_TRIGGERS;
-
-create table qrtz_job_details(
-job_name varchar(80) not null,
-job_group varchar(80) not null,
-description varchar(120),
-job_class_name varchar(128) not null,
-is_durable integer not null,
-is_volatile integer not null,
-is_stateful integer not null,
-requests_recovery integer not null,
-job_data blob(2000),
-primary key (job_name,job_group)
-);
-
-create table qrtz_job_listeners(
-job_name varchar(80) not null,
-job_group varchar(80) not null,
-job_listener varchar(80) not null,
-primary key (job_name,job_group,job_listener),
-foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_triggers(
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-job_name varchar(80) not null,
-job_group varchar(80) not null,
-is_volatile integer not null,
-description varchar(120),
-next_fire_time bigint,
-prev_fire_time bigint,
-trigger_state varchar(16) not null,
-trigger_type varchar(8) not null,
-start_time bigint not null,
-end_time bigint,
-calendar_name varchar(80),
-misfire_instr smallint,
-job_data blob(2000),
-primary key (trigger_name,trigger_group),
-foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_simple_triggers(
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-repeat_count bigint not null,
-repeat_interval bigint not null,
-times_triggered bigint not null,
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_cron_triggers(
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-cron_expression varchar(80) not null,
-time_zone_id varchar(80),
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_blob_triggers(
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-blob_data blob(2000),
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_trigger_listeners(
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-trigger_listener varchar(80) not null,
-primary key (trigger_name,trigger_group,trigger_listener),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_calendars(
-calendar_name varchar(80) not null,
-calendar blob(2000) not null,
-primary key (calendar_name)
-);
-
-create table qrtz_fired_triggers(
-entry_id varchar(95) not null,
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-is_volatile integer not null,
-instance_name varchar(80) not null,
-fired_time bigint not null,
-state varchar(16) not null,
-job_name varchar(80),
-job_group varchar(80),
-is_stateful integer,
-requests_recovery integer,
-primary key (entry_id)
-);
-
-create table qrtz_paused_trigger_grps(
-trigger_group varchar(80) not null,
-primary key (trigger_group)
-);
-
-create table qrtz_scheduler_state(
-instance_name varchar(80) not null,
-last_checkin_time bigint not null,
-checkin_interval bigint not null,
-recoverer varchar(80),
-primary key (instance_name)
-);
-
-create table qrtz_locks(
-lock_name varchar(40) not null,
-primary key (lock_name)
-);
-
-insert into qrtz_locks values('TRIGGER_ACCESS');
-insert into qrtz_locks values('JOB_ACCESS');
-insert into qrtz_locks values('CALENDAR_ACCESS');
-insert into qrtz_locks values('STATE_ACCESS');
-insert into qrtz_locks values('MISFIRE_ACCESS');
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_db2_v8.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,143 @@
+#
+# Updated by Claudiu Crisan (claudiu.crisan at schartner.net)
+# SQL scripts for DB2 ver 8.1
+#
+# Changes:
+# - "varchar(1)" replaced with "integer"
+# - "field_name varchar(xxx) not null" replaced with "field_name varchar(xxx)"
+#
+
+
+DROP TABLE QRTZ_JOB_LISTENERS;
+DROP TABLE QRTZ_TRIGGER_LISTENERS;
+DROP TABLE QRTZ_FIRED_TRIGGERS;
+DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE QRTZ_SCHEDULER_STATE;
+DROP TABLE QRTZ_LOCKS;
+DROP TABLE QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE QRTZ_CRON_TRIGGERS;
+DROP TABLE QRTZ_TRIGGERS;
+DROP TABLE QRTZ_JOB_DETAILS;
+DROP TABLE QRTZ_CALENDARS;
+DROP TABLE QRTZ_BLOB_TRIGGERS;
+
+create table qrtz_job_details(
+job_name varchar(80) not null,
+job_group varchar(80) not null,
+description varchar(120),
+job_class_name varchar(128) not null,
+is_durable integer not null,
+is_volatile integer not null,
+is_stateful integer not null,
+requests_recovery integer not null,
+job_data blob(2000),
+primary key (job_name,job_group)
+);
+
+create table qrtz_job_listeners(
+job_name varchar(80) not null,
+job_group varchar(80) not null,
+job_listener varchar(80) not null,
+primary key (job_name,job_group,job_listener),
+foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_triggers(
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+job_name varchar(80) not null,
+job_group varchar(80) not null,
+is_volatile integer not null,
+description varchar(120),
+next_fire_time bigint,
+prev_fire_time bigint,
+trigger_state varchar(16) not null,
+trigger_type varchar(8) not null,
+start_time bigint not null,
+end_time bigint,
+calendar_name varchar(80),
+misfire_instr smallint,
+job_data blob(2000),
+primary key (trigger_name,trigger_group),
+foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_simple_triggers(
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+repeat_count bigint not null,
+repeat_interval bigint not null,
+times_triggered bigint not null,
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_cron_triggers(
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+cron_expression varchar(80) not null,
+time_zone_id varchar(80),
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_blob_triggers(
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+blob_data blob(2000),
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_trigger_listeners(
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+trigger_listener varchar(80) not null,
+primary key (trigger_name,trigger_group,trigger_listener),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_calendars(
+calendar_name varchar(80) not null,
+calendar blob(2000) not null,
+primary key (calendar_name)
+);
+
+create table qrtz_fired_triggers(
+entry_id varchar(95) not null,
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+is_volatile integer not null,
+instance_name varchar(80) not null,
+fired_time bigint not null,
+state varchar(16) not null,
+job_name varchar(80),
+job_group varchar(80),
+is_stateful integer,
+requests_recovery integer,
+primary key (entry_id)
+);
+
+create table qrtz_paused_trigger_grps(
+trigger_group varchar(80) not null,
+primary key (trigger_group)
+);
+
+create table qrtz_scheduler_state(
+instance_name varchar(80) not null,
+last_checkin_time bigint not null,
+checkin_interval bigint not null,
+recoverer varchar(80),
+primary key (instance_name)
+);
+
+create table qrtz_locks(
+lock_name varchar(40) not null,
+primary key (lock_name)
+);
+
+insert into qrtz_locks values('TRIGGER_ACCESS');
+insert into qrtz_locks values('JOB_ACCESS');
+insert into qrtz_locks values('CALENDAR_ACCESS');
+insert into qrtz_locks values('STATE_ACCESS');
+insert into qrtz_locks values('MISFIRE_ACCESS');
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,132 +0,0 @@
---
--- Apache Derby scripts by Steve Stewart.
--- Based on Srinivas Venkatarangaiah's file for Cloudscape
---
--- In your Quartz properties file, you'll need to set
--- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.CloudscapeDelegate
---
--- Known to work with Apache Derby 10.0.2.1
---
-
-create table qrtz_job_details (
-job_name varchar(80) not null,
-job_group varchar(80) not null,
-description varchar(120) ,
-job_class_name varchar(128) not null,
-is_durable varchar(5) not null,
-is_volatile varchar(5) not null,
-is_stateful varchar(5) not null,
-requests_recovery varchar(5) not null,
-job_data blob,
-primary key (job_name,job_group)
-);
-
-create table qrtz_job_listeners (
-job_name varchar(80) not null,
-job_group varchar(80) not null,
-job_listener varchar(80) not null,
-primary key (job_name,job_group,job_listener),
-foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_triggers (
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-job_name varchar(80) not null,
-job_group varchar(80) not null,
-is_volatile varchar(5) not null,
-description varchar(120) ,
-next_fire_time bigint,
-prev_fire_time bigint,
-trigger_state varchar(16) not null,
-trigger_type varchar(8) not null,
-start_time bigint not null,
-end_time bigint,
-calendar_name varchar(80),
-misfire_instr smallint,
-job_data blob,
-primary key (trigger_name,trigger_group),
-foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
-);
-
-create table qrtz_simple_triggers (
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-repeat_count bigint not null,
-repeat_interval bigint not null,
-times_triggered bigint not null,
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_cron_triggers (
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-cron_expression varchar(80) not null,
-time_zone_id varchar(80),
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_blob_triggers (
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-blob_data blob ,
-primary key (trigger_name,trigger_group),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_trigger_listeners (
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-trigger_listener varchar(80) not null,
-primary key (trigger_name,trigger_group,trigger_listener),
-foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
-);
-
-create table qrtz_calendars (
-calendar_name varchar(80) not null,
-calendar blob not null,
-primary key (calendar_name)
-);
-
-create table qrtz_paused_trigger_grps (
-trigger_group varchar(80) not null,
-primary key (trigger_group)
-);
-
-create table qrtz_fired_triggers (
-entry_id varchar(95) not null,
-trigger_name varchar(80) not null,
-trigger_group varchar(80) not null,
-is_volatile varchar(5) not null,
-instance_name varchar(80) not null,
-fired_time bigint not null,
-state varchar(16) not null,
-job_name varchar(80),
-job_group varchar(80),
-is_stateful varchar(5),
-requests_recovery varchar(5),
-primary key (entry_id)
-);
-
-create table qrtz_scheduler_state (
-instance_name varchar(80) not null,
-last_checkin_time bigint not null,
-checkin_interval bigint not null,
-recoverer varchar(80),
-primary key (instance_name)
-);
-
-create table qrtz_locks (
-lock_name varchar(40) not null,
-primary key (lock_name)
-);
-
-insert into qrtz_locks values('TRIGGER_ACCESS');
-insert into qrtz_locks values('JOB_ACCESS');
-insert into qrtz_locks values('CALENDAR_ACCESS');
-insert into qrtz_locks values('STATE_ACCESS');
-insert into qrtz_locks values('MISFIRE_ACCESS');
-
-commit;
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_derby.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,132 @@
+--
+-- Apache Derby scripts by Steve Stewart.
+-- Based on Srinivas Venkatarangaiah's file for Cloudscape
+--
+-- In your Quartz properties file, you'll need to set
+-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.CloudscapeDelegate
+--
+-- Known to work with Apache Derby 10.0.2.1
+--
+
+create table qrtz_job_details (
+job_name varchar(80) not null,
+job_group varchar(80) not null,
+description varchar(120) ,
+job_class_name varchar(128) not null,
+is_durable varchar(5) not null,
+is_volatile varchar(5) not null,
+is_stateful varchar(5) not null,
+requests_recovery varchar(5) not null,
+job_data blob,
+primary key (job_name,job_group)
+);
+
+create table qrtz_job_listeners (
+job_name varchar(80) not null,
+job_group varchar(80) not null,
+job_listener varchar(80) not null,
+primary key (job_name,job_group,job_listener),
+foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_triggers (
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+job_name varchar(80) not null,
+job_group varchar(80) not null,
+is_volatile varchar(5) not null,
+description varchar(120) ,
+next_fire_time bigint,
+prev_fire_time bigint,
+trigger_state varchar(16) not null,
+trigger_type varchar(8) not null,
+start_time bigint not null,
+end_time bigint,
+calendar_name varchar(80),
+misfire_instr smallint,
+job_data blob,
+primary key (trigger_name,trigger_group),
+foreign key (job_name,job_group) references qrtz_job_details(job_name,job_group)
+);
+
+create table qrtz_simple_triggers (
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+repeat_count bigint not null,
+repeat_interval bigint not null,
+times_triggered bigint not null,
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_cron_triggers (
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+cron_expression varchar(80) not null,
+time_zone_id varchar(80),
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_blob_triggers (
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+blob_data blob ,
+primary key (trigger_name,trigger_group),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_trigger_listeners (
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+trigger_listener varchar(80) not null,
+primary key (trigger_name,trigger_group,trigger_listener),
+foreign key (trigger_name,trigger_group) references qrtz_triggers(trigger_name,trigger_group)
+);
+
+create table qrtz_calendars (
+calendar_name varchar(80) not null,
+calendar blob not null,
+primary key (calendar_name)
+);
+
+create table qrtz_paused_trigger_grps (
+trigger_group varchar(80) not null,
+primary key (trigger_group)
+);
+
+create table qrtz_fired_triggers (
+entry_id varchar(95) not null,
+trigger_name varchar(80) not null,
+trigger_group varchar(80) not null,
+is_volatile varchar(5) not null,
+instance_name varchar(80) not null,
+fired_time bigint not null,
+state varchar(16) not null,
+job_name varchar(80),
+job_group varchar(80),
+is_stateful varchar(5),
+requests_recovery varchar(5),
+primary key (entry_id)
+);
+
+create table qrtz_scheduler_state (
+instance_name varchar(80) not null,
+last_checkin_time bigint not null,
+checkin_interval bigint not null,
+recoverer varchar(80),
+primary key (instance_name)
+);
+
+create table qrtz_locks (
+lock_name varchar(40) not null,
+primary key (lock_name)
+);
+
+insert into qrtz_locks values('TRIGGER_ACCESS');
+insert into qrtz_locks values('JOB_ACCESS');
+insert into qrtz_locks values('CALENDAR_ACCESS');
+insert into qrtz_locks values('STATE_ACCESS');
+insert into qrtz_locks values('MISFIRE_ACCESS');
+
+commit;
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,149 +0,0 @@
-
---
--- Thanks to Leonardo Alves
---
-
-
-DROP TABLE QRTZ_JOB_LISTENERS;
-DROP TABLE QRTZ_TRIGGER_LISTENERS;
-DROP TABLE QRTZ_FIRED_TRIGGERS;
-DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE QRTZ_SCHEDULER_STATE;
-DROP TABLE QRTZ_LOCKS;
-DROP TABLE QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE QRTZ_CRON_TRIGGERS;
-DROP TABLE QRTZ_BLOB_TRIGGERS;
-DROP TABLE QRTZ_TRIGGERS;
-DROP TABLE QRTZ_JOB_DETAILS;
-DROP TABLE QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS (
- JOB_NAME VARCHAR(60) NOT NULL,
- JOB_GROUP VARCHAR(60) NOT NULL,
- DESCRIPTION VARCHAR(120),
- JOB_CLASS_NAME VARCHAR(128) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- IS_STATEFUL VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB,
- CONSTRAINT PK_QRTZ_JOB_DETAILS PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_JOB_LISTENERS (
- JOB_NAME VARCHAR(60) NOT NULL,
- JOB_GROUP VARCHAR(60) NOT NULL,
- JOB_LISTENER VARCHAR(60) NOT NULL,
- CONSTRAINT PK_QRTZ_JOB_LST PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
- CONSTRAINT FK_QRTZ_JOB_LST_1 FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS (
- TRIGGER_NAME VARCHAR(60) NOT NULL,
- TRIGGER_GROUP VARCHAR(60) NOT NULL,
- JOB_NAME VARCHAR(60) NOT NULL,
- JOB_GROUP VARCHAR(60) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- DESCRIPTION VARCHAR(120),
- NEXT_FIRE_TIME BIGINT,
- PREV_FIRE_TIME BIGINT,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT NOT NULL,
- END_TIME BIGINT,
- CALENDAR_NAME VARCHAR(60),
- MISFIRE_INSTR SMALLINT,
- JOB_DATA BLOB,
- CONSTRAINT PK_QRTZ_TRIGGERS PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- CONSTRAINT FK_QRTZ_TRIGGERS_1 FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
- TRIGGER_NAME VARCHAR(60) NOT NULL,
- TRIGGER_GROUP VARCHAR(60) NOT NULL,
- REPEAT_COUNT BIGINT NOT NULL,
- REPEAT_INTERVAL BIGINT NOT NULL,
- TIMES_TRIGGERED BIGINT NOT NULL,
- CONSTRAINT PK_QRTZ_SIMPLE_TRIGGERS PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS (
- TRIGGER_NAME VARCHAR(60) NOT NULL,
- TRIGGER_GROUP VARCHAR(60) NOT NULL,
- CRON_EXPRESSION VARCHAR(60) NOT NULL,
- TIME_ZONE_ID VARCHAR(60),
- CONSTRAINT PK_QRTZ_SIMPLE_TRG PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- CONSTRAINT FK_QRTZ_SIMPLE_TRG_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS (
- TRIGGER_NAME VARCHAR(60) NOT NULL,
- TRIGGER_GROUP VARCHAR(60) NOT NULL,
- BLOB_DATA BLOB,
- CONSTRAINT PK_QRTZ_BLOB_TRIGGERS PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- CONSTRAINT FK_QRTZ_BLOB_TRIGGERS_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGER_LISTENERS (
- TRIGGER_NAME VARCHAR(60) NOT NULL,
- TRIGGER_GROUP VARCHAR(60) NOT NULL,
- TRIGGER_LISTENER VARCHAR(60) NOT NULL,
- CONSTRAINT PK_QRTZ_TRIGGER_LST PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
- CONSTRAINT FK_QRTZ_TRIGGER_LST_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS (
- CALENDAR_NAME VARCHAR(60) NOT NULL,
- CALENDAR BLOB NOT NULL,
- CONSTRAINT PK_QRTZ_CALENDARS PRIMARY KEY (CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
- TRIGGER_GROUP VARCHAR(60) NOT NULL,
- CONSTRAINT PK_QRTZ_PAUSED_TRIGGER_GRPS PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS (
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(60) NOT NULL,
- TRIGGER_GROUP VARCHAR(60) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- INSTANCE_NAME VARCHAR(60) NOT NULL,
- FIRED_TIME BIGINT NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(60),
- JOB_GROUP VARCHAR(60),
- IS_STATEFUL VARCHAR(1),
- REQUESTS_RECOVERY VARCHAR(1),
- CONSTRAINT PK_QRTZ_FIRED_TRIGGERS PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE (
- INSTANCE_NAME VARCHAR(60) NOT NULL,
- LAST_CHECKIN_TIME BIGINT NOT NULL,
- CHECKIN_INTERVAL BIGINT NOT NULL,
- RECOVERER VARCHAR(60),
- CONSTRAINT PK_QRTZ_SCHEDULER_STATE PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS (
- LOCK_NAME VARCHAR(40) NOT NULL,
- CONSTRAINT PK_QRTZ_LOCKS PRIMARY KEY (LOCK_NAME)
-);
-
-INSERT INTO QRTZ_LOCKS VALUES('TRIGGER_ACCESS');
-INSERT INTO QRTZ_LOCKS VALUES('JOB_ACCESS');
-INSERT INTO QRTZ_LOCKS VALUES('CALENDAR_ACCESS');
-INSERT INTO QRTZ_LOCKS VALUES('STATE_ACCESS');
-INSERT INTO QRTZ_LOCKS VALUES('MISFIRE_ACCESS');
-
-COMMIT;
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_firebird.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,149 @@
+
+--
+-- Thanks to Leonardo Alves
+--
+
+
+DROP TABLE QRTZ_JOB_LISTENERS;
+DROP TABLE QRTZ_TRIGGER_LISTENERS;
+DROP TABLE QRTZ_FIRED_TRIGGERS;
+DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE QRTZ_SCHEDULER_STATE;
+DROP TABLE QRTZ_LOCKS;
+DROP TABLE QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE QRTZ_CRON_TRIGGERS;
+DROP TABLE QRTZ_BLOB_TRIGGERS;
+DROP TABLE QRTZ_TRIGGERS;
+DROP TABLE QRTZ_JOB_DETAILS;
+DROP TABLE QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS (
+ JOB_NAME VARCHAR(60) NOT NULL,
+ JOB_GROUP VARCHAR(60) NOT NULL,
+ DESCRIPTION VARCHAR(120),
+ JOB_CLASS_NAME VARCHAR(128) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ IS_STATEFUL VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB,
+ CONSTRAINT PK_QRTZ_JOB_DETAILS PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_JOB_LISTENERS (
+ JOB_NAME VARCHAR(60) NOT NULL,
+ JOB_GROUP VARCHAR(60) NOT NULL,
+ JOB_LISTENER VARCHAR(60) NOT NULL,
+ CONSTRAINT PK_QRTZ_JOB_LST PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+ CONSTRAINT FK_QRTZ_JOB_LST_1 FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS (
+ TRIGGER_NAME VARCHAR(60) NOT NULL,
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
+ JOB_NAME VARCHAR(60) NOT NULL,
+ JOB_GROUP VARCHAR(60) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ DESCRIPTION VARCHAR(120),
+ NEXT_FIRE_TIME BIGINT,
+ PREV_FIRE_TIME BIGINT,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT NOT NULL,
+ END_TIME BIGINT,
+ CALENDAR_NAME VARCHAR(60),
+ MISFIRE_INSTR SMALLINT,
+ JOB_DATA BLOB,
+ CONSTRAINT PK_QRTZ_TRIGGERS PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ CONSTRAINT FK_QRTZ_TRIGGERS_1 FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
+ TRIGGER_NAME VARCHAR(60) NOT NULL,
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
+ REPEAT_COUNT BIGINT NOT NULL,
+ REPEAT_INTERVAL BIGINT NOT NULL,
+ TIMES_TRIGGERED BIGINT NOT NULL,
+ CONSTRAINT PK_QRTZ_SIMPLE_TRIGGERS PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS (
+ TRIGGER_NAME VARCHAR(60) NOT NULL,
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
+ CRON_EXPRESSION VARCHAR(60) NOT NULL,
+ TIME_ZONE_ID VARCHAR(60),
+ CONSTRAINT PK_QRTZ_SIMPLE_TRG PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ CONSTRAINT FK_QRTZ_SIMPLE_TRG_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS (
+ TRIGGER_NAME VARCHAR(60) NOT NULL,
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
+ BLOB_DATA BLOB,
+ CONSTRAINT PK_QRTZ_BLOB_TRIGGERS PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ CONSTRAINT FK_QRTZ_BLOB_TRIGGERS_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGER_LISTENERS (
+ TRIGGER_NAME VARCHAR(60) NOT NULL,
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
+ TRIGGER_LISTENER VARCHAR(60) NOT NULL,
+ CONSTRAINT PK_QRTZ_TRIGGER_LST PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+ CONSTRAINT FK_QRTZ_TRIGGER_LST_1 FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS (
+ CALENDAR_NAME VARCHAR(60) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ CONSTRAINT PK_QRTZ_CALENDARS PRIMARY KEY (CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
+ CONSTRAINT PK_QRTZ_PAUSED_TRIGGER_GRPS PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS (
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(60) NOT NULL,
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ INSTANCE_NAME VARCHAR(60) NOT NULL,
+ FIRED_TIME BIGINT NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(60),
+ JOB_GROUP VARCHAR(60),
+ IS_STATEFUL VARCHAR(1),
+ REQUESTS_RECOVERY VARCHAR(1),
+ CONSTRAINT PK_QRTZ_FIRED_TRIGGERS PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE (
+ INSTANCE_NAME VARCHAR(60) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT NOT NULL,
+ CHECKIN_INTERVAL BIGINT NOT NULL,
+ RECOVERER VARCHAR(60),
+ CONSTRAINT PK_QRTZ_SCHEDULER_STATE PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS (
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ CONSTRAINT PK_QRTZ_LOCKS PRIMARY KEY (LOCK_NAME)
+);
+
+INSERT INTO QRTZ_LOCKS VALUES('TRIGGER_ACCESS');
+INSERT INTO QRTZ_LOCKS VALUES('JOB_ACCESS');
+INSERT INTO QRTZ_LOCKS VALUES('CALENDAR_ACCESS');
+INSERT INTO QRTZ_LOCKS VALUES('STATE_ACCESS');
+INSERT INTO QRTZ_LOCKS VALUES('MISFIRE_ACCESS');
+
+COMMIT;
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,157 +0,0 @@
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.HSQLDBDelegate
-#
-
-DROP TABLE qrtz_locks IF EXISTS;
-DROP TABLE qrtz_scheduler_state IF EXISTS;
-DROP TABLE qrtz_fired_triggers IF EXISTS;
-DROP TABLE qrtz_paused_trigger_grps IF EXISTS;
-DROP TABLE qrtz_calendars IF EXISTS;
-DROP TABLE qrtz_trigger_listeners IF EXISTS;
-DROP TABLE qrtz_blob_triggers IF EXISTS;
-DROP TABLE qrtz_cron_triggers IF EXISTS;
-DROP TABLE qrtz_simple_triggers IF EXISTS;
-DROP TABLE qrtz_triggers IF EXISTS;
-DROP TABLE qrtz_job_listeners IF EXISTS;
-DROP TABLE qrtz_job_details IF EXISTS;
-
-CREATE TABLE qrtz_job_details
-(
-JOB_NAME VARCHAR(80) NOT NULL,
-JOB_GROUP VARCHAR(80) NOT NULL,
-DESCRIPTION VARCHAR(120) NULL,
-JOB_CLASS_NAME VARCHAR(128) NOT NULL,
-IS_DURABLE VARCHAR(1) NOT NULL,
-IS_VOLATILE VARCHAR(1) NOT NULL,
-IS_STATEFUL VARCHAR(1) NOT NULL,
-REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
-JOB_DATA BINARY NULL,
-PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_job_listeners
-(
-JOB_NAME VARCHAR(80) NOT NULL,
-JOB_GROUP VARCHAR(80) NOT NULL,
-JOB_LISTENER VARCHAR(80) NOT NULL,
-PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
-FOREIGN KEY (JOB_NAME,JOB_GROUP)
-REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_triggers
-(
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-JOB_NAME VARCHAR(80) NOT NULL,
-JOB_GROUP VARCHAR(80) NOT NULL,
-IS_VOLATILE VARCHAR(1) NOT NULL,
-DESCRIPTION VARCHAR(120) NULL,
-NEXT_FIRE_TIME NUMERIC(13) NULL,
-PREV_FIRE_TIME NUMERIC(13) NULL,
-TRIGGER_STATE VARCHAR(16) NOT NULL,
-TRIGGER_TYPE VARCHAR(8) NOT NULL,
-START_TIME NUMERIC(13) NOT NULL,
-END_TIME NUMERIC(13) NULL,
-CALENDAR_NAME VARCHAR(80) NULL,
-MISFIRE_INSTR NUMERIC(2) NULL,
-JOB_DATA BINARY NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (JOB_NAME,JOB_GROUP)
-REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_simple_triggers
-(
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-REPEAT_COUNT NUMERIC(7) NOT NULL,
-REPEAT_INTERVAL NUMERIC(12) NOT NULL,
-TIMES_TRIGGERED NUMERIC(7) NOT NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_cron_triggers
-(
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-CRON_EXPRESSION VARCHAR(80) NOT NULL,
-TIME_ZONE_ID VARCHAR(80),
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_blob_triggers
-(
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-BLOB_DATA BINARY NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_trigger_listeners
-(
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-TRIGGER_LISTENER VARCHAR(80) NOT NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_calendars
-(
-CALENDAR_NAME VARCHAR(80) NOT NULL,
-CALENDAR BINARY NOT NULL,
-PRIMARY KEY (CALENDAR_NAME)
-);
-
-CREATE TABLE qrtz_paused_trigger_grps
-(
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_fired_triggers
-(
-ENTRY_ID VARCHAR(95) NOT NULL,
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-IS_VOLATILE VARCHAR(1) NOT NULL,
-INSTANCE_NAME VARCHAR(80) NOT NULL,
-FIRED_TIME NUMERIC(13) NOT NULL,
-STATE VARCHAR(16) NOT NULL,
-JOB_NAME VARCHAR(80) NULL,
-JOB_GROUP VARCHAR(80) NULL,
-IS_STATEFUL VARCHAR(1) NULL,
-REQUESTS_RECOVERY VARCHAR(1) NULL,
-PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE qrtz_scheduler_state
-(
-INSTANCE_NAME VARCHAR(80) NOT NULL,
-LAST_CHECKIN_TIME NUMERIC(13) NOT NULL,
-CHECKIN_INTERVAL NUMERIC(13) NOT NULL,
-RECOVERER VARCHAR(80) NULL,
-PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE qrtz_locks
-(
-LOCK_NAME VARCHAR(40) NOT NULL,
-PRIMARY KEY (LOCK_NAME)
-);
-
-INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
-INSERT INTO qrtz_locks values('JOB_ACCESS');
-INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
-INSERT INTO qrtz_locks values('STATE_ACCESS');
-INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,157 @@
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.HSQLDBDelegate
+#
+
+DROP TABLE qrtz_locks IF EXISTS;
+DROP TABLE qrtz_scheduler_state IF EXISTS;
+DROP TABLE qrtz_fired_triggers IF EXISTS;
+DROP TABLE qrtz_paused_trigger_grps IF EXISTS;
+DROP TABLE qrtz_calendars IF EXISTS;
+DROP TABLE qrtz_trigger_listeners IF EXISTS;
+DROP TABLE qrtz_blob_triggers IF EXISTS;
+DROP TABLE qrtz_cron_triggers IF EXISTS;
+DROP TABLE qrtz_simple_triggers IF EXISTS;
+DROP TABLE qrtz_triggers IF EXISTS;
+DROP TABLE qrtz_job_listeners IF EXISTS;
+DROP TABLE qrtz_job_details IF EXISTS;
+
+CREATE TABLE qrtz_job_details
+(
+JOB_NAME VARCHAR(80) NOT NULL,
+JOB_GROUP VARCHAR(80) NOT NULL,
+DESCRIPTION VARCHAR(120) NULL,
+JOB_CLASS_NAME VARCHAR(128) NOT NULL,
+IS_DURABLE VARCHAR(1) NOT NULL,
+IS_VOLATILE VARCHAR(1) NOT NULL,
+IS_STATEFUL VARCHAR(1) NOT NULL,
+REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+JOB_DATA BINARY NULL,
+PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_job_listeners
+(
+JOB_NAME VARCHAR(80) NOT NULL,
+JOB_GROUP VARCHAR(80) NOT NULL,
+JOB_LISTENER VARCHAR(80) NOT NULL,
+PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+FOREIGN KEY (JOB_NAME,JOB_GROUP)
+REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_triggers
+(
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+JOB_NAME VARCHAR(80) NOT NULL,
+JOB_GROUP VARCHAR(80) NOT NULL,
+IS_VOLATILE VARCHAR(1) NOT NULL,
+DESCRIPTION VARCHAR(120) NULL,
+NEXT_FIRE_TIME NUMERIC(13) NULL,
+PREV_FIRE_TIME NUMERIC(13) NULL,
+TRIGGER_STATE VARCHAR(16) NOT NULL,
+TRIGGER_TYPE VARCHAR(8) NOT NULL,
+START_TIME NUMERIC(13) NOT NULL,
+END_TIME NUMERIC(13) NULL,
+CALENDAR_NAME VARCHAR(80) NULL,
+MISFIRE_INSTR NUMERIC(2) NULL,
+JOB_DATA BINARY NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (JOB_NAME,JOB_GROUP)
+REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_simple_triggers
+(
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+REPEAT_COUNT NUMERIC(7) NOT NULL,
+REPEAT_INTERVAL NUMERIC(12) NOT NULL,
+TIMES_TRIGGERED NUMERIC(7) NOT NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_cron_triggers
+(
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+CRON_EXPRESSION VARCHAR(80) NOT NULL,
+TIME_ZONE_ID VARCHAR(80),
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_blob_triggers
+(
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+BLOB_DATA BINARY NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_trigger_listeners
+(
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+TRIGGER_LISTENER VARCHAR(80) NOT NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_calendars
+(
+CALENDAR_NAME VARCHAR(80) NOT NULL,
+CALENDAR BINARY NOT NULL,
+PRIMARY KEY (CALENDAR_NAME)
+);
+
+CREATE TABLE qrtz_paused_trigger_grps
+(
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_fired_triggers
+(
+ENTRY_ID VARCHAR(95) NOT NULL,
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+IS_VOLATILE VARCHAR(1) NOT NULL,
+INSTANCE_NAME VARCHAR(80) NOT NULL,
+FIRED_TIME NUMERIC(13) NOT NULL,
+STATE VARCHAR(16) NOT NULL,
+JOB_NAME VARCHAR(80) NULL,
+JOB_GROUP VARCHAR(80) NULL,
+IS_STATEFUL VARCHAR(1) NULL,
+REQUESTS_RECOVERY VARCHAR(1) NULL,
+PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE qrtz_scheduler_state
+(
+INSTANCE_NAME VARCHAR(80) NOT NULL,
+LAST_CHECKIN_TIME NUMERIC(13) NOT NULL,
+CHECKIN_INTERVAL NUMERIC(13) NOT NULL,
+RECOVERER VARCHAR(80) NULL,
+PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE qrtz_locks
+(
+LOCK_NAME VARCHAR(40) NOT NULL,
+PRIMARY KEY (LOCK_NAME)
+);
+
+INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
+INSERT INTO qrtz_locks values('JOB_ACCESS');
+INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
+INSERT INTO qrtz_locks values('STATE_ACCESS');
+INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,152 +0,0 @@
-#
-# Thanks to Joseph Wilkicki for submitting this file's contents
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.HSQLDBDelegate
-#
-# Some users report the need to change the fields
-# with datatype "OTHER" to datatype "BINARY" with
-# particular versions (e.g. 1.7.1) of HSQLDB
-#
-
-CREATE TABLE qrtz_job_details
-(
-JOB_NAME LONGVARCHAR(80) NOT NULL,
-JOB_GROUP LONGVARCHAR(80) NOT NULL,
-DESCRIPTION LONGVARCHAR(120) NULL,
-JOB_CLASS_NAME LONGVARCHAR(128) NOT NULL,
-IS_DURABLE LONGVARCHAR(1) NOT NULL,
-IS_VOLATILE LONGVARCHAR(1) NOT NULL,
-IS_STATEFUL LONGVARCHAR(1) NOT NULL,
-REQUESTS_RECOVERY LONGVARCHAR(1) NOT NULL,
-JOB_DATA OTHER NULL,
-PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_job_listeners
-(
-JOB_NAME LONGVARCHAR(80) NOT NULL,
-JOB_GROUP LONGVARCHAR(80) NOT NULL,
-JOB_LISTENER LONGVARCHAR(80) NOT NULL,
-PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
-FOREIGN KEY (JOB_NAME,JOB_GROUP)
-REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_triggers
-(
-TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
-TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
-JOB_NAME LONGVARCHAR(80) NOT NULL,
-JOB_GROUP LONGVARCHAR(80) NOT NULL,
-IS_VOLATILE LONGVARCHAR(1) NOT NULL,
-DESCRIPTION LONGVARCHAR(120) NULL,
-NEXT_FIRE_TIME NUMERIC(13) NULL,
-PREV_FIRE_TIME NUMERIC(13) NULL,
-TRIGGER_STATE LONGVARCHAR(16) NOT NULL,
-TRIGGER_TYPE LONGVARCHAR(8) NOT NULL,
-START_TIME NUMERIC(13) NOT NULL,
-END_TIME NUMERIC(13) NULL,
-CALENDAR_NAME LONGVARCHAR(80) NULL,
-MISFIRE_INSTR NUMERIC(2) NULL,
-JOB_DATA OTHER NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (JOB_NAME,JOB_GROUP)
-REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_simple_triggers
-(
-TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
-TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
-REPEAT_COUNT NUMERIC(7) NOT NULL,
-REPEAT_INTERVAL NUMERIC(12) NOT NULL,
-TIMES_TRIGGERED NUMERIC(7) NOT NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_cron_triggers
-(
-TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
-TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
-CRON_EXPRESSION LONGVARCHAR(80) NOT NULL,
-TIME_ZONE_ID LONGVARCHAR(80),
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_blob_triggers
-(
-TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
-TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
-BLOB_DATA OTHER NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_trigger_listeners
-(
-TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
-TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
-TRIGGER_LISTENER LONGVARCHAR(80) NOT NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_calendars
-(
-CALENDAR_NAME LONGVARCHAR(80) NOT NULL,
-CALENDAR OTHER NOT NULL,
-PRIMARY KEY (CALENDAR_NAME)
-);
-
-CREATE TABLE qrtz_paused_trigger_grps
- (
- TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_fired_triggers
- (
- ENTRY_ID LONGVARCHAR(95) NOT NULL,
- TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
- TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
- IS_VOLATILE LONGVARCHAR(1) NOT NULL,
- INSTANCE_NAME LONGVARCHAR(80) NOT NULL,
- FIRED_TIME NUMERIC(13) NOT NULL,
- STATE LONGVARCHAR(16) NOT NULL,
- JOB_NAME LONGVARCHAR(80) NULL,
- JOB_GROUP LONGVARCHAR(80) NULL,
- IS_STATEFUL LONGVARCHAR(1) NULL,
- REQUESTS_RECOVERY LONGVARCHAR(1) NULL,
- PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE qrtz_scheduler_state
- (
- INSTANCE_NAME LONGVARCHAR(80) NOT NULL,
- LAST_CHECKIN_TIME NUMERIC(13) NOT NULL,
- CHECKIN_INTERVAL NUMERIC(13) NOT NULL,
- RECOVERER LONGVARCHAR(80) NULL,
- PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE qrtz_locks
- (
- LOCK_NAME LONGVARCHAR(40) NOT NULL,
- PRIMARY KEY (LOCK_NAME)
-);
-
-
-INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
-INSERT INTO qrtz_locks values('JOB_ACCESS');
-INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
-INSERT INTO qrtz_locks values('STATE_ACCESS');
-INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
-
-commit;
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_hsqldb_old.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,152 @@
+#
+# Thanks to Joseph Wilkicki for submitting this file's contents
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.HSQLDBDelegate
+#
+# Some users report the need to change the fields
+# with datatype "OTHER" to datatype "BINARY" with
+# particular versions (e.g. 1.7.1) of HSQLDB
+#
+
+CREATE TABLE qrtz_job_details
+(
+JOB_NAME LONGVARCHAR(80) NOT NULL,
+JOB_GROUP LONGVARCHAR(80) NOT NULL,
+DESCRIPTION LONGVARCHAR(120) NULL,
+JOB_CLASS_NAME LONGVARCHAR(128) NOT NULL,
+IS_DURABLE LONGVARCHAR(1) NOT NULL,
+IS_VOLATILE LONGVARCHAR(1) NOT NULL,
+IS_STATEFUL LONGVARCHAR(1) NOT NULL,
+REQUESTS_RECOVERY LONGVARCHAR(1) NOT NULL,
+JOB_DATA OTHER NULL,
+PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_job_listeners
+(
+JOB_NAME LONGVARCHAR(80) NOT NULL,
+JOB_GROUP LONGVARCHAR(80) NOT NULL,
+JOB_LISTENER LONGVARCHAR(80) NOT NULL,
+PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+FOREIGN KEY (JOB_NAME,JOB_GROUP)
+REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_triggers
+(
+TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
+TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
+JOB_NAME LONGVARCHAR(80) NOT NULL,
+JOB_GROUP LONGVARCHAR(80) NOT NULL,
+IS_VOLATILE LONGVARCHAR(1) NOT NULL,
+DESCRIPTION LONGVARCHAR(120) NULL,
+NEXT_FIRE_TIME NUMERIC(13) NULL,
+PREV_FIRE_TIME NUMERIC(13) NULL,
+TRIGGER_STATE LONGVARCHAR(16) NOT NULL,
+TRIGGER_TYPE LONGVARCHAR(8) NOT NULL,
+START_TIME NUMERIC(13) NOT NULL,
+END_TIME NUMERIC(13) NULL,
+CALENDAR_NAME LONGVARCHAR(80) NULL,
+MISFIRE_INSTR NUMERIC(2) NULL,
+JOB_DATA OTHER NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (JOB_NAME,JOB_GROUP)
+REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_simple_triggers
+(
+TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
+TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
+REPEAT_COUNT NUMERIC(7) NOT NULL,
+REPEAT_INTERVAL NUMERIC(12) NOT NULL,
+TIMES_TRIGGERED NUMERIC(7) NOT NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_cron_triggers
+(
+TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
+TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
+CRON_EXPRESSION LONGVARCHAR(80) NOT NULL,
+TIME_ZONE_ID LONGVARCHAR(80),
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_blob_triggers
+(
+TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
+TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
+BLOB_DATA OTHER NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_trigger_listeners
+(
+TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
+TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
+TRIGGER_LISTENER LONGVARCHAR(80) NOT NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_calendars
+(
+CALENDAR_NAME LONGVARCHAR(80) NOT NULL,
+CALENDAR OTHER NOT NULL,
+PRIMARY KEY (CALENDAR_NAME)
+);
+
+CREATE TABLE qrtz_paused_trigger_grps
+ (
+ TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_fired_triggers
+ (
+ ENTRY_ID LONGVARCHAR(95) NOT NULL,
+ TRIGGER_NAME LONGVARCHAR(80) NOT NULL,
+ TRIGGER_GROUP LONGVARCHAR(80) NOT NULL,
+ IS_VOLATILE LONGVARCHAR(1) NOT NULL,
+ INSTANCE_NAME LONGVARCHAR(80) NOT NULL,
+ FIRED_TIME NUMERIC(13) NOT NULL,
+ STATE LONGVARCHAR(16) NOT NULL,
+ JOB_NAME LONGVARCHAR(80) NULL,
+ JOB_GROUP LONGVARCHAR(80) NULL,
+ IS_STATEFUL LONGVARCHAR(1) NULL,
+ REQUESTS_RECOVERY LONGVARCHAR(1) NULL,
+ PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE qrtz_scheduler_state
+ (
+ INSTANCE_NAME LONGVARCHAR(80) NOT NULL,
+ LAST_CHECKIN_TIME NUMERIC(13) NOT NULL,
+ CHECKIN_INTERVAL NUMERIC(13) NOT NULL,
+ RECOVERER LONGVARCHAR(80) NULL,
+ PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE qrtz_locks
+ (
+ LOCK_NAME LONGVARCHAR(40) NOT NULL,
+ PRIMARY KEY (LOCK_NAME)
+);
+
+
+INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
+INSERT INTO qrtz_locks values('JOB_ACCESS');
+INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
+INSERT INTO qrtz_locks values('STATE_ACCESS');
+INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
+
+commit;
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,196 +0,0 @@
-##
-## Thanks to Keith Chew for submitting this.
-##
-## use the StdJDBCDelegate with Informix.
-##
-## note that Informix has a 18 cahracter limit on the table name, so the prefix had to be shortened to "q" instread of "qrtz_"
-
-CREATE TABLE qblob_triggers (
-TRIGGER_NAME varchar(80) NOT NULL,
-TRIGGER_GROUP varchar(80) NOT NULL,
-BLOB_DATA byte in table
-);
-
-
-ALTER TABLE qblob_triggers
-ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
-
-
-CREATE TABLE qcalendars (
-CALENDAR_NAME varchar(80) NOT NULL,
-CALENDAR byte in table NOT NULL
-);
-
-
-ALTER TABLE qcalendars
-ADD CONSTRAINT PRIMARY KEY (CALENDAR_NAME);
-
-
-CREATE TABLE qcron_triggers (
-TRIGGER_NAME varchar(80) NOT NULL,
-TRIGGER_GROUP varchar(80) NOT NULL,
-CRON_EXPRESSION varchar(80) NOT NULL,
-TIME_ZONE_ID varchar(80)
-);
-
-
-ALTER TABLE qcron_triggers
-ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
-
-
-CREATE TABLE qfired_triggers (
-ENTRY_ID varchar(95) NOT NULL,
-TRIGGER_NAME varchar(80) NOT NULL,
-TRIGGER_GROUP varchar(80) NOT NULL,
-IS_VOLATILE varchar(1) NOT NULL,
-INSTANCE_NAME varchar(80) NOT NULL,
-FIRED_TIME numeric(13) NOT NULL,
-STATE varchar(16) NOT NULL,
-JOB_NAME varchar(80),
-JOB_GROUP varchar(80),
-IS_STATEFUL varchar(1),
-REQUESTS_RECOVERY varchar(1)
-);
-
-
-ALTER TABLE qfired_triggers
-ADD CONSTRAINT PRIMARY KEY (ENTRY_ID);
-
-
-CREATE TABLE qpaused_trigger_grps (
-TRIGGER_GROUP VARCHAR2(80) NOT NULL,
-);
-
-ALTER TABLE qpaused_trigger_grps
-ADD CONSTRAINT PRIMARY KEY (TRIGGER_GROUP);
-
-
-CREATE TABLE qscheduler_state (
-INSTANCE_NAME varchar(80) NOT NULL,
-LAST_CHECKIN_TIME numeric(13) NOT NULL,
-CHECKIN_INTERVAL numeric(13) NOT NULL,
-RECOVERER varchar(80)
-);
-
-ALTER TABLE qscheduler_state
-ADD CONSTRAINT PRIMARY KEY (INSTANCE_NAME);
-
-
-CREATE TABLE qlocks (
-LOCK_NAME varchar(40) NOT NULL,
-);
-
-ALTER TABLE qlocks
-ADD CONSTRAINT PRIMARY KEY (LOCK_NAME);
-
-INSERT INTO qlocks values('TRIGGER_ACCESS');
-INSERT INTO qlocks values('JOB_ACCESS');
-INSERT INTO qlocks values('CALENDAR_ACCESS');
-INSERT INTO qlocks values('STATE_ACCESS');
-
-
-
-CREATE TABLE qjob_details (
-JOB_NAME varchar(80) NOT NULL,
-JOB_GROUP varchar(80) NOT NULL,
-DESCRIPTION varchar(120),
-JOB_CLASS_NAME varchar(128) NOT NULL,
-IS_DURABLE varchar(1) NOT NULL,
-IS_VOLATILE varchar(1) NOT NULL,
-IS_STATEFUL varchar(1) NOT NULL,
-REQUESTS_RECOVERY varchar(1) NOT NULL,
-JOB_DATA byte in table
-);
-
-
-ALTER TABLE qjob_details
-ADD CONSTRAINT PRIMARY KEY (JOB_NAME, JOB_GROUP);
-
-
-CREATE TABLE qjob_listeners (
-JOB_NAME varchar(80) NOT NULL,
-JOB_GROUP varchar(80) NOT NULL,
-JOB_LISTENER varchar(80) NOT NULL
-);
-
-
-ALTER TABLE qjob_listeners
-ADD CONSTRAINT PRIMARY KEY (JOB_NAME, JOB_GROUP, JOB_LISTENER);
-
-
-CREATE TABLE qsimple_triggers (
-TRIGGER_NAME varchar(80) NOT NULL,
-TRIGGER_GROUP varchar(80) NOT NULL,
-REPEAT_COUNT numeric(7) NOT NULL,
-REPEAT_INTERVAL numeric(12) NOT NULL,
-TIMES_TRIGGERED numeric(7) NOT NULL
-);
-
-
-ALTER TABLE qsimple_triggers
-ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
-
-
-CREATE TABLE qtrigger_listeners (
-TRIGGER_NAME varchar(80) NOT NULL,
-TRIGGER_GROUP varchar(80) NOT NULL,
-TRIGGER_LISTENER varchar(80) NOT NULL
-);
-
-
-ALTER TABLE qtrigger_listeners
-ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP,
-TRIGGER_LISTENER);
-
-
-CREATE TABLE qtriggers (
-TRIGGER_NAME varchar(80) NOT NULL,
-TRIGGER_GROUP varchar(80) NOT NULL,
-JOB_NAME varchar(80) NOT NULL,
-JOB_GROUP varchar(80) NOT NULL,
-IS_VOLATILE varchar(1) NOT NULL,
-DESCRIPTION varchar(120),
-NEXT_FIRE_TIME numeric(13),
-PREV_FIRE_TIME numeric(13),
-TRIGGER_STATE varchar(16) NOT NULL,
-TRIGGER_TYPE varchar(8) NOT NULL,
-START_TIME numeric(13) NOT NULL,
-END_TIME numeric(13),
-CALENDAR_NAME varchar(80),
-MISFIRE_INSTR numeric(2)
-JOB_DATA byte in table
-);
-
-
-ALTER TABLE qtriggers
-ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
-
-
-ALTER TABLE qblob_triggers
-ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
-REFERENCES qtriggers;
-
-
-ALTER TABLE qcron_triggers
-ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
-REFERENCES qtriggers;
-
-
-ALTER TABLE qjob_listeners
-ADD CONSTRAINT FOREIGN KEY (JOB_NAME, JOB_GROUP)
-REFERENCES qjob_details;
-
-
-ALTER TABLE qsimple_triggers
-ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
-REFERENCES qtriggers;
-
-
-ALTER TABLE qtrigger_listeners
-ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
-REFERENCES qtriggers;
-
-
-ALTER TABLE qtriggers
-ADD CONSTRAINT FOREIGN KEY (JOB_NAME, JOB_GROUP)
-REFERENCES qjob_details;
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_informix.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,196 @@
+##
+## Thanks to Keith Chew for submitting this.
+##
+## use the StdJDBCDelegate with Informix.
+##
+## note that Informix has a 18 cahracter limit on the table name, so the prefix had to be shortened to "q" instread of "qrtz_"
+
+CREATE TABLE qblob_triggers (
+TRIGGER_NAME varchar(80) NOT NULL,
+TRIGGER_GROUP varchar(80) NOT NULL,
+BLOB_DATA byte in table
+);
+
+
+ALTER TABLE qblob_triggers
+ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
+
+
+CREATE TABLE qcalendars (
+CALENDAR_NAME varchar(80) NOT NULL,
+CALENDAR byte in table NOT NULL
+);
+
+
+ALTER TABLE qcalendars
+ADD CONSTRAINT PRIMARY KEY (CALENDAR_NAME);
+
+
+CREATE TABLE qcron_triggers (
+TRIGGER_NAME varchar(80) NOT NULL,
+TRIGGER_GROUP varchar(80) NOT NULL,
+CRON_EXPRESSION varchar(80) NOT NULL,
+TIME_ZONE_ID varchar(80)
+);
+
+
+ALTER TABLE qcron_triggers
+ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
+
+
+CREATE TABLE qfired_triggers (
+ENTRY_ID varchar(95) NOT NULL,
+TRIGGER_NAME varchar(80) NOT NULL,
+TRIGGER_GROUP varchar(80) NOT NULL,
+IS_VOLATILE varchar(1) NOT NULL,
+INSTANCE_NAME varchar(80) NOT NULL,
+FIRED_TIME numeric(13) NOT NULL,
+STATE varchar(16) NOT NULL,
+JOB_NAME varchar(80),
+JOB_GROUP varchar(80),
+IS_STATEFUL varchar(1),
+REQUESTS_RECOVERY varchar(1)
+);
+
+
+ALTER TABLE qfired_triggers
+ADD CONSTRAINT PRIMARY KEY (ENTRY_ID);
+
+
+CREATE TABLE qpaused_trigger_grps (
+TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+);
+
+ALTER TABLE qpaused_trigger_grps
+ADD CONSTRAINT PRIMARY KEY (TRIGGER_GROUP);
+
+
+CREATE TABLE qscheduler_state (
+INSTANCE_NAME varchar(80) NOT NULL,
+LAST_CHECKIN_TIME numeric(13) NOT NULL,
+CHECKIN_INTERVAL numeric(13) NOT NULL,
+RECOVERER varchar(80)
+);
+
+ALTER TABLE qscheduler_state
+ADD CONSTRAINT PRIMARY KEY (INSTANCE_NAME);
+
+
+CREATE TABLE qlocks (
+LOCK_NAME varchar(40) NOT NULL,
+);
+
+ALTER TABLE qlocks
+ADD CONSTRAINT PRIMARY KEY (LOCK_NAME);
+
+INSERT INTO qlocks values('TRIGGER_ACCESS');
+INSERT INTO qlocks values('JOB_ACCESS');
+INSERT INTO qlocks values('CALENDAR_ACCESS');
+INSERT INTO qlocks values('STATE_ACCESS');
+
+
+
+CREATE TABLE qjob_details (
+JOB_NAME varchar(80) NOT NULL,
+JOB_GROUP varchar(80) NOT NULL,
+DESCRIPTION varchar(120),
+JOB_CLASS_NAME varchar(128) NOT NULL,
+IS_DURABLE varchar(1) NOT NULL,
+IS_VOLATILE varchar(1) NOT NULL,
+IS_STATEFUL varchar(1) NOT NULL,
+REQUESTS_RECOVERY varchar(1) NOT NULL,
+JOB_DATA byte in table
+);
+
+
+ALTER TABLE qjob_details
+ADD CONSTRAINT PRIMARY KEY (JOB_NAME, JOB_GROUP);
+
+
+CREATE TABLE qjob_listeners (
+JOB_NAME varchar(80) NOT NULL,
+JOB_GROUP varchar(80) NOT NULL,
+JOB_LISTENER varchar(80) NOT NULL
+);
+
+
+ALTER TABLE qjob_listeners
+ADD CONSTRAINT PRIMARY KEY (JOB_NAME, JOB_GROUP, JOB_LISTENER);
+
+
+CREATE TABLE qsimple_triggers (
+TRIGGER_NAME varchar(80) NOT NULL,
+TRIGGER_GROUP varchar(80) NOT NULL,
+REPEAT_COUNT numeric(7) NOT NULL,
+REPEAT_INTERVAL numeric(12) NOT NULL,
+TIMES_TRIGGERED numeric(7) NOT NULL
+);
+
+
+ALTER TABLE qsimple_triggers
+ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
+
+
+CREATE TABLE qtrigger_listeners (
+TRIGGER_NAME varchar(80) NOT NULL,
+TRIGGER_GROUP varchar(80) NOT NULL,
+TRIGGER_LISTENER varchar(80) NOT NULL
+);
+
+
+ALTER TABLE qtrigger_listeners
+ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP,
+TRIGGER_LISTENER);
+
+
+CREATE TABLE qtriggers (
+TRIGGER_NAME varchar(80) NOT NULL,
+TRIGGER_GROUP varchar(80) NOT NULL,
+JOB_NAME varchar(80) NOT NULL,
+JOB_GROUP varchar(80) NOT NULL,
+IS_VOLATILE varchar(1) NOT NULL,
+DESCRIPTION varchar(120),
+NEXT_FIRE_TIME numeric(13),
+PREV_FIRE_TIME numeric(13),
+TRIGGER_STATE varchar(16) NOT NULL,
+TRIGGER_TYPE varchar(8) NOT NULL,
+START_TIME numeric(13) NOT NULL,
+END_TIME numeric(13),
+CALENDAR_NAME varchar(80),
+MISFIRE_INSTR numeric(2)
+JOB_DATA byte in table
+);
+
+
+ALTER TABLE qtriggers
+ADD CONSTRAINT PRIMARY KEY (TRIGGER_NAME, TRIGGER_GROUP);
+
+
+ALTER TABLE qblob_triggers
+ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
+REFERENCES qtriggers;
+
+
+ALTER TABLE qcron_triggers
+ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
+REFERENCES qtriggers;
+
+
+ALTER TABLE qjob_listeners
+ADD CONSTRAINT FOREIGN KEY (JOB_NAME, JOB_GROUP)
+REFERENCES qjob_details;
+
+
+ALTER TABLE qsimple_triggers
+ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
+REFERENCES qtriggers;
+
+
+ALTER TABLE qtrigger_listeners
+ADD CONSTRAINT FOREIGN KEY (TRIGGER_NAME, TRIGGER_GROUP)
+REFERENCES qtriggers;
+
+
+ALTER TABLE qtriggers
+ADD CONSTRAINT FOREIGN KEY (JOB_NAME, JOB_GROUP)
+REFERENCES qjob_details;
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,166 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_JOB_LISTENERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGER_LISTENERS;
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- JOB_CLASS_NAME VARCHAR(128) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- IS_STATEFUL VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_JOB_LISTENERS
- (
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- JOB_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(80) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(7) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- CRON_EXPRESSION VARCHAR(80) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGER_LISTENERS
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- TRIGGER_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-
-CREATE TABLE QRTZ_CALENDARS
- (
- CALENDAR_NAME VARCHAR(80) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (CALENDAR_NAME)
-);
-
-
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(80) NULL,
- JOB_GROUP VARCHAR(80) NULL,
- IS_STATEFUL VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- RECOVERER VARCHAR(80) NULL,
- PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (LOCK_NAME)
-);
-
-
-INSERT INTO QRTZ_LOCKS values('TRIGGER_ACCESS');
-INSERT INTO QRTZ_LOCKS values('JOB_ACCESS');
-INSERT INTO QRTZ_LOCKS values('CALENDAR_ACCESS');
-INSERT INTO QRTZ_LOCKS values('STATE_ACCESS');
-INSERT INTO QRTZ_LOCKS values('MISFIRE_ACCESS');
-
-
-commit;
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,166 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_JOB_LISTENERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGER_LISTENERS;
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ JOB_CLASS_NAME VARCHAR(128) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ IS_STATEFUL VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_JOB_LISTENERS
+ (
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ JOB_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(80) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(7) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ CRON_EXPRESSION VARCHAR(80) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGER_LISTENERS
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ TRIGGER_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ CALENDAR_NAME VARCHAR(80) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (CALENDAR_NAME)
+);
+
+
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(80) NULL,
+ JOB_GROUP VARCHAR(80) NULL,
+ IS_STATEFUL VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ RECOVERER VARCHAR(80) NULL,
+ PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (LOCK_NAME)
+);
+
+
+INSERT INTO QRTZ_LOCKS values('TRIGGER_ACCESS');
+INSERT INTO QRTZ_LOCKS values('JOB_ACCESS');
+INSERT INTO QRTZ_LOCKS values('CALENDAR_ACCESS');
+INSERT INTO QRTZ_LOCKS values('STATE_ACCESS');
+INSERT INTO QRTZ_LOCKS values('MISFIRE_ACCESS');
+
+
+commit;
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,154 +0,0 @@
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-#
-# By: Ron Cordell - roncordell
-# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.
-
-DROP TABLE IF EXISTS QRTZ_JOB_LISTENERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGER_LISTENERS;
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-CREATE TABLE QRTZ_JOB_DETAILS(
-JOB_NAME VARCHAR(80) NOT NULL,
-JOB_GROUP VARCHAR(80) NOT NULL,
-DESCRIPTION VARCHAR(120) NULL,
-JOB_CLASS_NAME VARCHAR(128) NOT NULL,
-IS_DURABLE VARCHAR(1) NOT NULL,
-IS_VOLATILE VARCHAR(1) NOT NULL,
-IS_STATEFUL VARCHAR(1) NOT NULL,
-REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
-JOB_DATA BLOB NULL,
-PRIMARY KEY (JOB_NAME,JOB_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_JOB_LISTENERS (
-JOB_NAME VARCHAR(80) NOT NULL,
-JOB_GROUP VARCHAR(80) NOT NULL,
-JOB_LISTENER VARCHAR(80) NOT NULL,
-PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
-INDEX (JOB_NAME, JOB_GROUP),
-FOREIGN KEY (JOB_NAME,JOB_GROUP)
-REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_TRIGGERS (
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-JOB_NAME VARCHAR(80) NOT NULL,
-JOB_GROUP VARCHAR(80) NOT NULL,
-IS_VOLATILE VARCHAR(1) NOT NULL,
-DESCRIPTION VARCHAR(120) NULL,
-NEXT_FIRE_TIME BIGINT(13) NULL,
-PREV_FIRE_TIME BIGINT(13) NULL,
-TRIGGER_STATE VARCHAR(16) NOT NULL,
-TRIGGER_TYPE VARCHAR(8) NOT NULL,
-START_TIME BIGINT(13) NOT NULL,
-END_TIME BIGINT(13) NULL,
-CALENDAR_NAME VARCHAR(80) NULL,
-MISFIRE_INSTR SMALLINT(2) NULL,
-JOB_DATA BLOB NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-INDEX (JOB_NAME, JOB_GROUP),
-FOREIGN KEY (JOB_NAME,JOB_GROUP)
-REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-REPEAT_COUNT BIGINT(7) NOT NULL,
-REPEAT_INTERVAL BIGINT(12) NOT NULL,
-TIMES_TRIGGERED BIGINT(7) NOT NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-INDEX (TRIGGER_NAME, TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_CRON_TRIGGERS (
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-CRON_EXPRESSION VARCHAR(80) NOT NULL,
-TIME_ZONE_ID VARCHAR(80),
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-INDEX (TRIGGER_NAME, TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS (
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-BLOB_DATA BLOB NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
-INDEX (TRIGGER_NAME, TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_TRIGGER_LISTENERS (
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-TRIGGER_LISTENER VARCHAR(80) NOT NULL,
-PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
-INDEX (TRIGGER_NAME, TRIGGER_GROUP),
-FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_CALENDARS (
-CALENDAR_NAME VARCHAR(80) NOT NULL,
-CALENDAR BLOB NOT NULL,
-PRIMARY KEY (CALENDAR_NAME))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-PRIMARY KEY (TRIGGER_GROUP))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS (
-ENTRY_ID VARCHAR(95) NOT NULL,
-TRIGGER_NAME VARCHAR(80) NOT NULL,
-TRIGGER_GROUP VARCHAR(80) NOT NULL,
-IS_VOLATILE VARCHAR(1) NOT NULL,
-INSTANCE_NAME VARCHAR(80) NOT NULL,
-FIRED_TIME BIGINT(13) NOT NULL,
-STATE VARCHAR(16) NOT NULL,
-JOB_NAME VARCHAR(80) NULL,
-JOB_GROUP VARCHAR(80) NULL,
-IS_STATEFUL VARCHAR(1) NULL,
-REQUESTS_RECOVERY VARCHAR(1) NULL,
-PRIMARY KEY (ENTRY_ID))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_SCHEDULER_STATE (
-INSTANCE_NAME VARCHAR(80) NOT NULL,
-LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
-CHECKIN_INTERVAL BIGINT(13) NOT NULL,
-RECOVERER VARCHAR(80) NULL,
-PRIMARY KEY (INSTANCE_NAME))
-TYPE=InnoDB;
-
-CREATE TABLE QRTZ_LOCKS (
-LOCK_NAME VARCHAR(40) NOT NULL,
-PRIMARY KEY (LOCK_NAME))
-TYPE=InnoDB;
-
-INSERT INTO QRTZ_LOCKS values('TRIGGER_ACCESS');
-INSERT INTO QRTZ_LOCKS values('JOB_ACCESS');
-INSERT INTO QRTZ_LOCKS values('CALENDAR_ACCESS');
-INSERT INTO QRTZ_LOCKS values('STATE_ACCESS');
-INSERT INTO QRTZ_LOCKS values('MISFIRE_ACCESS');
-commit;
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_mysql_innodb.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,154 @@
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+#
+# By: Ron Cordell - roncordell
+# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.
+
+DROP TABLE IF EXISTS QRTZ_JOB_LISTENERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGER_LISTENERS;
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+CREATE TABLE QRTZ_JOB_DETAILS(
+JOB_NAME VARCHAR(80) NOT NULL,
+JOB_GROUP VARCHAR(80) NOT NULL,
+DESCRIPTION VARCHAR(120) NULL,
+JOB_CLASS_NAME VARCHAR(128) NOT NULL,
+IS_DURABLE VARCHAR(1) NOT NULL,
+IS_VOLATILE VARCHAR(1) NOT NULL,
+IS_STATEFUL VARCHAR(1) NOT NULL,
+REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+JOB_DATA BLOB NULL,
+PRIMARY KEY (JOB_NAME,JOB_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_JOB_LISTENERS (
+JOB_NAME VARCHAR(80) NOT NULL,
+JOB_GROUP VARCHAR(80) NOT NULL,
+JOB_LISTENER VARCHAR(80) NOT NULL,
+PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+INDEX (JOB_NAME, JOB_GROUP),
+FOREIGN KEY (JOB_NAME,JOB_GROUP)
+REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_TRIGGERS (
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+JOB_NAME VARCHAR(80) NOT NULL,
+JOB_GROUP VARCHAR(80) NOT NULL,
+IS_VOLATILE VARCHAR(1) NOT NULL,
+DESCRIPTION VARCHAR(120) NULL,
+NEXT_FIRE_TIME BIGINT(13) NULL,
+PREV_FIRE_TIME BIGINT(13) NULL,
+TRIGGER_STATE VARCHAR(16) NOT NULL,
+TRIGGER_TYPE VARCHAR(8) NOT NULL,
+START_TIME BIGINT(13) NOT NULL,
+END_TIME BIGINT(13) NULL,
+CALENDAR_NAME VARCHAR(80) NULL,
+MISFIRE_INSTR SMALLINT(2) NULL,
+JOB_DATA BLOB NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+INDEX (JOB_NAME, JOB_GROUP),
+FOREIGN KEY (JOB_NAME,JOB_GROUP)
+REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+REPEAT_COUNT BIGINT(7) NOT NULL,
+REPEAT_INTERVAL BIGINT(12) NOT NULL,
+TIMES_TRIGGERED BIGINT(7) NOT NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+INDEX (TRIGGER_NAME, TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_CRON_TRIGGERS (
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+CRON_EXPRESSION VARCHAR(80) NOT NULL,
+TIME_ZONE_ID VARCHAR(80),
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+INDEX (TRIGGER_NAME, TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS (
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+BLOB_DATA BLOB NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+INDEX (TRIGGER_NAME, TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_TRIGGER_LISTENERS (
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+TRIGGER_LISTENER VARCHAR(80) NOT NULL,
+PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+INDEX (TRIGGER_NAME, TRIGGER_GROUP),
+FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_CALENDARS (
+CALENDAR_NAME VARCHAR(80) NOT NULL,
+CALENDAR BLOB NOT NULL,
+PRIMARY KEY (CALENDAR_NAME))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+PRIMARY KEY (TRIGGER_GROUP))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS (
+ENTRY_ID VARCHAR(95) NOT NULL,
+TRIGGER_NAME VARCHAR(80) NOT NULL,
+TRIGGER_GROUP VARCHAR(80) NOT NULL,
+IS_VOLATILE VARCHAR(1) NOT NULL,
+INSTANCE_NAME VARCHAR(80) NOT NULL,
+FIRED_TIME BIGINT(13) NOT NULL,
+STATE VARCHAR(16) NOT NULL,
+JOB_NAME VARCHAR(80) NULL,
+JOB_GROUP VARCHAR(80) NULL,
+IS_STATEFUL VARCHAR(1) NULL,
+REQUESTS_RECOVERY VARCHAR(1) NULL,
+PRIMARY KEY (ENTRY_ID))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_SCHEDULER_STATE (
+INSTANCE_NAME VARCHAR(80) NOT NULL,
+LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+RECOVERER VARCHAR(80) NULL,
+PRIMARY KEY (INSTANCE_NAME))
+TYPE=InnoDB;
+
+CREATE TABLE QRTZ_LOCKS (
+LOCK_NAME VARCHAR(40) NOT NULL,
+PRIMARY KEY (LOCK_NAME))
+TYPE=InnoDB;
+
+INSERT INTO QRTZ_LOCKS values('TRIGGER_ACCESS');
+INSERT INTO QRTZ_LOCKS values('JOB_ACCESS');
+INSERT INTO QRTZ_LOCKS values('CALENDAR_ACCESS');
+INSERT INTO QRTZ_LOCKS values('STATE_ACCESS');
+INSERT INTO QRTZ_LOCKS values('MISFIRE_ACCESS');
+commit;
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,179 +0,0 @@
---
--- A hint submitted by a user: Oracle DB MUST be created as "shared" and the
--- job_queue_processes parameter must be greater than 2, otherwise a DB lock
--- will happen. However, these settings are pretty much standard after any
--- Oracle install, so most users need not worry about this.
---
-
-delete from qrtz_job_listeners;
-delete from qrtz_trigger_listeners;
-delete from qrtz_fired_triggers;
-delete from qrtz_simple_triggers;
-delete from qrtz_cron_triggers;
-delete from qrtz_blob_triggers;
-delete from qrtz_triggers;
-delete from qrtz_job_details;
-delete from qrtz_calendars;
-delete from qrtz_paused_trigger_grps;
-delete from qrtz_locks;
-delete from qrtz_scheduler_state;
-
-drop table qrtz_calendars;
-drop table qrtz_fired_triggers;
-drop table qrtz_trigger_listeners;
-drop table qrtz_blob_triggers;
-drop table qrtz_cron_triggers;
-drop table qrtz_simple_triggers;
-drop table qrtz_triggers;
-drop table qrtz_job_listeners;
-drop table qrtz_job_details;
-drop table qrtz_paused_trigger_grps;
-drop table qrtz_locks;
-drop table qrtz_scheduler_state;
-
-
-CREATE TABLE qrtz_job_details
- (
- JOB_NAME VARCHAR2(80) NOT NULL,
- JOB_GROUP VARCHAR2(80) NOT NULL,
- DESCRIPTION VARCHAR2(120) NULL,
- JOB_CLASS_NAME VARCHAR2(128) NOT NULL,
- IS_DURABLE VARCHAR2(1) NOT NULL,
- IS_VOLATILE VARCHAR2(1) NOT NULL,
- IS_STATEFUL VARCHAR2(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR2(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-CREATE TABLE qrtz_job_listeners
- (
- JOB_NAME VARCHAR2(80) NOT NULL,
- JOB_GROUP VARCHAR2(80) NOT NULL,
- JOB_LISTENER VARCHAR2(80) NOT NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-CREATE TABLE qrtz_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- JOB_NAME VARCHAR2(80) NOT NULL,
- JOB_GROUP VARCHAR2(80) NOT NULL,
- IS_VOLATILE VARCHAR2(1) NOT NULL,
- DESCRIPTION VARCHAR2(120) NULL,
- NEXT_FIRE_TIME NUMBER(13) NULL,
- PREV_FIRE_TIME NUMBER(13) NULL,
- TRIGGER_STATE VARCHAR2(16) NOT NULL,
- TRIGGER_TYPE VARCHAR2(8) NOT NULL,
- START_TIME NUMBER(13) NOT NULL,
- END_TIME NUMBER(13) NULL,
- CALENDAR_NAME VARCHAR2(80) NULL,
- MISFIRE_INSTR NUMBER(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-CREATE TABLE qrtz_simple_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- REPEAT_COUNT NUMBER(7) NOT NULL,
- REPEAT_INTERVAL NUMBER(12) NOT NULL,
- TIMES_TRIGGERED NUMBER(7) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-CREATE TABLE qrtz_cron_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- CRON_EXPRESSION VARCHAR2(80) NOT NULL,
- TIME_ZONE_ID VARCHAR2(80),
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-CREATE TABLE qrtz_blob_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-CREATE TABLE qrtz_trigger_listeners
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- TRIGGER_LISTENER VARCHAR2(80) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-CREATE TABLE qrtz_calendars
- (
- CALENDAR_NAME VARCHAR2(80) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (CALENDAR_NAME)
-);
-CREATE TABLE qrtz_paused_trigger_grps
- (
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- PRIMARY KEY (TRIGGER_GROUP)
-);
-CREATE TABLE qrtz_fired_triggers
- (
- ENTRY_ID VARCHAR2(95) NOT NULL,
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- IS_VOLATILE VARCHAR2(1) NOT NULL,
- INSTANCE_NAME VARCHAR2(80) NOT NULL,
- FIRED_TIME NUMBER(13) NOT NULL,
- STATE VARCHAR2(16) NOT NULL,
- JOB_NAME VARCHAR2(80) NULL,
- JOB_GROUP VARCHAR2(80) NULL,
- IS_STATEFUL VARCHAR2(1) NULL,
- REQUESTS_RECOVERY VARCHAR2(1) NULL,
- PRIMARY KEY (ENTRY_ID)
-);
-CREATE TABLE qrtz_scheduler_state
- (
- INSTANCE_NAME VARCHAR2(80) NOT NULL,
- LAST_CHECKIN_TIME NUMBER(13) NOT NULL,
- CHECKIN_INTERVAL NUMBER(13) NOT NULL,
- RECOVERER VARCHAR2(80) NULL,
- PRIMARY KEY (INSTANCE_NAME)
-);
-CREATE TABLE qrtz_locks
- (
- LOCK_NAME VARCHAR2(40) NOT NULL,
- PRIMARY KEY (LOCK_NAME)
-);
-INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
-INSERT INTO qrtz_locks values('JOB_ACCESS');
-INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
-INSERT INTO qrtz_locks values('STATE_ACCESS');
-INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
-create index idx_qrtz_j_req_recovery on qrtz_job_details(REQUESTS_RECOVERY);
-create index idx_qrtz_t_next_fire_time on qrtz_triggers(NEXT_FIRE_TIME);
-create index idx_qrtz_t_state on qrtz_triggers(TRIGGER_STATE);
-create index idx_qrtz_t_nft_st on qrtz_triggers(NEXT_FIRE_TIME,TRIGGER_STATE);
-create index idx_qrtz_t_volatile on qrtz_triggers(IS_VOLATILE);
-create index idx_qrtz_ft_trig_name on qrtz_fired_triggers(TRIGGER_NAME);
-create index idx_qrtz_ft_trig_group on qrtz_fired_triggers(TRIGGER_GROUP);
-create index idx_qrtz_ft_trig_nm_gp on qrtz_fired_triggers(TRIGGER_NAME,TRIGGER_GROUP);
-create index idx_qrtz_ft_trig_volatile on qrtz_fired_triggers(IS_VOLATILE);
-create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(INSTANCE_NAME);
-create index idx_qrtz_ft_job_name on qrtz_fired_triggers(JOB_NAME);
-create index idx_qrtz_ft_job_group on qrtz_fired_triggers(JOB_GROUP);
-create index idx_qrtz_ft_job_stateful on qrtz_fired_triggers(IS_STATEFUL);
-create index idx_qrtz_ft_job_req_recovery on qrtz_fired_triggers(REQUESTS_RECOVERY);
-
-
-
-commit;
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_oracle.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,179 @@
+--
+-- A hint submitted by a user: Oracle DB MUST be created as "shared" and the
+-- job_queue_processes parameter must be greater than 2, otherwise a DB lock
+-- will happen. However, these settings are pretty much standard after any
+-- Oracle install, so most users need not worry about this.
+--
+
+delete from qrtz_job_listeners;
+delete from qrtz_trigger_listeners;
+delete from qrtz_fired_triggers;
+delete from qrtz_simple_triggers;
+delete from qrtz_cron_triggers;
+delete from qrtz_blob_triggers;
+delete from qrtz_triggers;
+delete from qrtz_job_details;
+delete from qrtz_calendars;
+delete from qrtz_paused_trigger_grps;
+delete from qrtz_locks;
+delete from qrtz_scheduler_state;
+
+drop table qrtz_calendars;
+drop table qrtz_fired_triggers;
+drop table qrtz_trigger_listeners;
+drop table qrtz_blob_triggers;
+drop table qrtz_cron_triggers;
+drop table qrtz_simple_triggers;
+drop table qrtz_triggers;
+drop table qrtz_job_listeners;
+drop table qrtz_job_details;
+drop table qrtz_paused_trigger_grps;
+drop table qrtz_locks;
+drop table qrtz_scheduler_state;
+
+
+CREATE TABLE qrtz_job_details
+ (
+ JOB_NAME VARCHAR2(80) NOT NULL,
+ JOB_GROUP VARCHAR2(80) NOT NULL,
+ DESCRIPTION VARCHAR2(120) NULL,
+ JOB_CLASS_NAME VARCHAR2(128) NOT NULL,
+ IS_DURABLE VARCHAR2(1) NOT NULL,
+ IS_VOLATILE VARCHAR2(1) NOT NULL,
+ IS_STATEFUL VARCHAR2(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR2(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+CREATE TABLE qrtz_job_listeners
+ (
+ JOB_NAME VARCHAR2(80) NOT NULL,
+ JOB_GROUP VARCHAR2(80) NOT NULL,
+ JOB_LISTENER VARCHAR2(80) NOT NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+CREATE TABLE qrtz_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ JOB_NAME VARCHAR2(80) NOT NULL,
+ JOB_GROUP VARCHAR2(80) NOT NULL,
+ IS_VOLATILE VARCHAR2(1) NOT NULL,
+ DESCRIPTION VARCHAR2(120) NULL,
+ NEXT_FIRE_TIME NUMBER(13) NULL,
+ PREV_FIRE_TIME NUMBER(13) NULL,
+ TRIGGER_STATE VARCHAR2(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR2(8) NOT NULL,
+ START_TIME NUMBER(13) NOT NULL,
+ END_TIME NUMBER(13) NULL,
+ CALENDAR_NAME VARCHAR2(80) NULL,
+ MISFIRE_INSTR NUMBER(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+CREATE TABLE qrtz_simple_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ REPEAT_COUNT NUMBER(7) NOT NULL,
+ REPEAT_INTERVAL NUMBER(12) NOT NULL,
+ TIMES_TRIGGERED NUMBER(7) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+CREATE TABLE qrtz_cron_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ CRON_EXPRESSION VARCHAR2(80) NOT NULL,
+ TIME_ZONE_ID VARCHAR2(80),
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+CREATE TABLE qrtz_blob_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+CREATE TABLE qrtz_trigger_listeners
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ TRIGGER_LISTENER VARCHAR2(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+CREATE TABLE qrtz_calendars
+ (
+ CALENDAR_NAME VARCHAR2(80) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (CALENDAR_NAME)
+);
+CREATE TABLE qrtz_paused_trigger_grps
+ (
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_GROUP)
+);
+CREATE TABLE qrtz_fired_triggers
+ (
+ ENTRY_ID VARCHAR2(95) NOT NULL,
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ IS_VOLATILE VARCHAR2(1) NOT NULL,
+ INSTANCE_NAME VARCHAR2(80) NOT NULL,
+ FIRED_TIME NUMBER(13) NOT NULL,
+ STATE VARCHAR2(16) NOT NULL,
+ JOB_NAME VARCHAR2(80) NULL,
+ JOB_GROUP VARCHAR2(80) NULL,
+ IS_STATEFUL VARCHAR2(1) NULL,
+ REQUESTS_RECOVERY VARCHAR2(1) NULL,
+ PRIMARY KEY (ENTRY_ID)
+);
+CREATE TABLE qrtz_scheduler_state
+ (
+ INSTANCE_NAME VARCHAR2(80) NOT NULL,
+ LAST_CHECKIN_TIME NUMBER(13) NOT NULL,
+ CHECKIN_INTERVAL NUMBER(13) NOT NULL,
+ RECOVERER VARCHAR2(80) NULL,
+ PRIMARY KEY (INSTANCE_NAME)
+);
+CREATE TABLE qrtz_locks
+ (
+ LOCK_NAME VARCHAR2(40) NOT NULL,
+ PRIMARY KEY (LOCK_NAME)
+);
+INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
+INSERT INTO qrtz_locks values('JOB_ACCESS');
+INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
+INSERT INTO qrtz_locks values('STATE_ACCESS');
+INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
+create index idx_qrtz_j_req_recovery on qrtz_job_details(REQUESTS_RECOVERY);
+create index idx_qrtz_t_next_fire_time on qrtz_triggers(NEXT_FIRE_TIME);
+create index idx_qrtz_t_state on qrtz_triggers(TRIGGER_STATE);
+create index idx_qrtz_t_nft_st on qrtz_triggers(NEXT_FIRE_TIME,TRIGGER_STATE);
+create index idx_qrtz_t_volatile on qrtz_triggers(IS_VOLATILE);
+create index idx_qrtz_ft_trig_name on qrtz_fired_triggers(TRIGGER_NAME);
+create index idx_qrtz_ft_trig_group on qrtz_fired_triggers(TRIGGER_GROUP);
+create index idx_qrtz_ft_trig_nm_gp on qrtz_fired_triggers(TRIGGER_NAME,TRIGGER_GROUP);
+create index idx_qrtz_ft_trig_volatile on qrtz_fired_triggers(IS_VOLATILE);
+create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(INSTANCE_NAME);
+create index idx_qrtz_ft_job_name on qrtz_fired_triggers(JOB_NAME);
+create index idx_qrtz_ft_job_group on qrtz_fired_triggers(JOB_GROUP);
+create index idx_qrtz_ft_job_stateful on qrtz_fired_triggers(IS_STATEFUL);
+create index idx_qrtz_ft_job_req_recovery on qrtz_fired_triggers(REQUESTS_RECOVERY);
+
+
+
+commit;
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,177 +0,0 @@
-#
-# Thanks to Gregg Freeman
-#
-#
-# ...you may want to change defined the size of the "blob" columns before
-# creating the tables (particularly for the qrtz_job_details.job_data column),
-# if you will be storing large amounts of data in them
-#
-#
-delete from qrtz_job_listeners;
-delete from qrtz_trigger_listeners;
-delete from qrtz_fired_triggers;
-delete from qrtz_simple_triggers;
-delete from qrtz_cron_triggers;
-delete from qrtz_blob_triggers;
-delete from qrtz_triggers;
-delete from qrtz_job_details;
-delete from qrtz_calendars;
-delete from qrtz_paused_trigger_grps;
-delete from qrtz_locks;
-delete from qrtz_scheduler_state;
-
-drop table qrtz_calendars;
-drop table qrtz_fired_triggers;
-drop table qrtz_trigger_listeners;
-drop table qrtz_blob_triggers;
-drop table qrtz_cron_triggers;
-drop table qrtz_simple_triggers;
-drop table qrtz_triggers;
-drop table qrtz_job_listeners;
-drop table qrtz_job_details;
-drop table qrtz_paused_trigger_grps;
-drop table qrtz_locks;
-drop table qrtz_scheduler_state;
-
-
-CREATE TABLE qrtz_job_details
- (
- JOB_NAME VARCHAR2(80) NOT NULL,
- JOB_GROUP VARCHAR2(80) NOT NULL,
- DESCRIPTION VARCHAR2(120) NULL,
- JOB_CLASS_NAME VARCHAR2(128) NOT NULL,
- IS_DURABLE BOOLEAN NOT NULL,
- IS_VOLATILE BOOLEAN NOT NULL,
- IS_STATEFUL BOOLEAN NOT NULL,
- REQUESTS_RECOVERY BOOLEAN NOT NULL,
- JOB_DATA BLOB(4K) NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_job_listeners
- (
- JOB_NAME VARCHAR2(80) NOT NULL,
- JOB_GROUP VARCHAR2(80) NOT NULL,
- JOB_LISTENER VARCHAR2(80) NOT NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- JOB_NAME VARCHAR2(80) NOT NULL,
- JOB_GROUP VARCHAR2(80) NOT NULL,
- IS_VOLATILE BOOLEAN NOT NULL,
- DESCRIPTION VARCHAR2(120) NULL,
- NEXT_FIRE_TIME NUMBER(13) NULL,
- PREV_FIRE_TIME NUMBER(13) NULL,
- TRIGGER_STATE VARCHAR2(16) NOT NULL,
- TRIGGER_TYPE VARCHAR2(8) NOT NULL,
- START_TIME NUMBER(13) NOT NULL,
- END_TIME NUMBER(13) NULL,
- CALENDAR_NAME VARCHAR2(80) NULL,
- MISFIRE_INSTR NUMBER(2) NULL,
- JOB_DATA BLOB(4K) NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_simple_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- REPEAT_COUNT NUMBER(7) NOT NULL,
- REPEAT_INTERVAL NUMBER(12) NOT NULL,
- TIMES_TRIGGERED NUMBER(7) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_cron_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- CRON_EXPRESSION VARCHAR2(80) NOT NULL,
- TIME_ZONE_ID VARCHAR2(80),
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_blob_triggers
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- BLOB_DATA BLOB(4K) NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_trigger_listeners
- (
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- TRIGGER_LISTENER VARCHAR2(80) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_calendars
- (
- CALENDAR_NAME VARCHAR2(80) NOT NULL,
- CALENDAR BLOB(4K) NOT NULL,
- PRIMARY KEY (CALENDAR_NAME)
-);
-
-CREATE TABLE qrtz_paused_trigger_grps
- (
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_fired_triggers
- (
- ENTRY_ID VARCHAR2(95) NOT NULL,
- TRIGGER_NAME VARCHAR2(80) NOT NULL,
- TRIGGER_GROUP VARCHAR2(80) NOT NULL,
- IS_VOLATILE BOOLEAN NOT NULL,
- INSTANCE_NAME VARCHAR2(80) NOT NULL,
- FIRED_TIME NUMBER(13) NOT NULL,
- STATE VARCHAR2(16) NOT NULL,
- JOB_NAME VARCHAR2(80) NULL,
- JOB_GROUP VARCHAR2(80) NULL,
- IS_STATEFUL BOOLEAN NULL,
- REQUESTS_RECOVERY BOOLEAN NULL,
- PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE qrtz_scheduler_state
- (
- INSTANCE_NAME VARCHAR2(80) NOT NULL,
- LAST_CHECKIN_TIME NUMBER(13) NOT NULL,
- CHECKIN_INTERVAL NUMBER(13) NOT NULL,
- RECOVERER VARCHAR2(80) NULL,
- PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE qrtz_locks
- (
- LOCK_NAME VARCHAR2(40) NOT NULL,
- PRIMARY KEY (LOCK_NAME)
-);
-
-
-INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
-INSERT INTO qrtz_locks values('JOB_ACCESS');
-INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
-INSERT INTO qrtz_locks values('STATE_ACCESS');
-INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
-
-commit;
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_pointbase.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,177 @@
+#
+# Thanks to Gregg Freeman
+#
+#
+# ...you may want to change defined the size of the "blob" columns before
+# creating the tables (particularly for the qrtz_job_details.job_data column),
+# if you will be storing large amounts of data in them
+#
+#
+delete from qrtz_job_listeners;
+delete from qrtz_trigger_listeners;
+delete from qrtz_fired_triggers;
+delete from qrtz_simple_triggers;
+delete from qrtz_cron_triggers;
+delete from qrtz_blob_triggers;
+delete from qrtz_triggers;
+delete from qrtz_job_details;
+delete from qrtz_calendars;
+delete from qrtz_paused_trigger_grps;
+delete from qrtz_locks;
+delete from qrtz_scheduler_state;
+
+drop table qrtz_calendars;
+drop table qrtz_fired_triggers;
+drop table qrtz_trigger_listeners;
+drop table qrtz_blob_triggers;
+drop table qrtz_cron_triggers;
+drop table qrtz_simple_triggers;
+drop table qrtz_triggers;
+drop table qrtz_job_listeners;
+drop table qrtz_job_details;
+drop table qrtz_paused_trigger_grps;
+drop table qrtz_locks;
+drop table qrtz_scheduler_state;
+
+
+CREATE TABLE qrtz_job_details
+ (
+ JOB_NAME VARCHAR2(80) NOT NULL,
+ JOB_GROUP VARCHAR2(80) NOT NULL,
+ DESCRIPTION VARCHAR2(120) NULL,
+ JOB_CLASS_NAME VARCHAR2(128) NOT NULL,
+ IS_DURABLE BOOLEAN NOT NULL,
+ IS_VOLATILE BOOLEAN NOT NULL,
+ IS_STATEFUL BOOLEAN NOT NULL,
+ REQUESTS_RECOVERY BOOLEAN NOT NULL,
+ JOB_DATA BLOB(4K) NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_job_listeners
+ (
+ JOB_NAME VARCHAR2(80) NOT NULL,
+ JOB_GROUP VARCHAR2(80) NOT NULL,
+ JOB_LISTENER VARCHAR2(80) NOT NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ JOB_NAME VARCHAR2(80) NOT NULL,
+ JOB_GROUP VARCHAR2(80) NOT NULL,
+ IS_VOLATILE BOOLEAN NOT NULL,
+ DESCRIPTION VARCHAR2(120) NULL,
+ NEXT_FIRE_TIME NUMBER(13) NULL,
+ PREV_FIRE_TIME NUMBER(13) NULL,
+ TRIGGER_STATE VARCHAR2(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR2(8) NOT NULL,
+ START_TIME NUMBER(13) NOT NULL,
+ END_TIME NUMBER(13) NULL,
+ CALENDAR_NAME VARCHAR2(80) NULL,
+ MISFIRE_INSTR NUMBER(2) NULL,
+ JOB_DATA BLOB(4K) NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_simple_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ REPEAT_COUNT NUMBER(7) NOT NULL,
+ REPEAT_INTERVAL NUMBER(12) NOT NULL,
+ TIMES_TRIGGERED NUMBER(7) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_cron_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ CRON_EXPRESSION VARCHAR2(80) NOT NULL,
+ TIME_ZONE_ID VARCHAR2(80),
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_blob_triggers
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ BLOB_DATA BLOB(4K) NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_trigger_listeners
+ (
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ TRIGGER_LISTENER VARCHAR2(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_calendars
+ (
+ CALENDAR_NAME VARCHAR2(80) NOT NULL,
+ CALENDAR BLOB(4K) NOT NULL,
+ PRIMARY KEY (CALENDAR_NAME)
+);
+
+CREATE TABLE qrtz_paused_trigger_grps
+ (
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_fired_triggers
+ (
+ ENTRY_ID VARCHAR2(95) NOT NULL,
+ TRIGGER_NAME VARCHAR2(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR2(80) NOT NULL,
+ IS_VOLATILE BOOLEAN NOT NULL,
+ INSTANCE_NAME VARCHAR2(80) NOT NULL,
+ FIRED_TIME NUMBER(13) NOT NULL,
+ STATE VARCHAR2(16) NOT NULL,
+ JOB_NAME VARCHAR2(80) NULL,
+ JOB_GROUP VARCHAR2(80) NULL,
+ IS_STATEFUL BOOLEAN NULL,
+ REQUESTS_RECOVERY BOOLEAN NULL,
+ PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE qrtz_scheduler_state
+ (
+ INSTANCE_NAME VARCHAR2(80) NOT NULL,
+ LAST_CHECKIN_TIME NUMBER(13) NOT NULL,
+ CHECKIN_INTERVAL NUMBER(13) NOT NULL,
+ RECOVERER VARCHAR2(80) NULL,
+ PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE qrtz_locks
+ (
+ LOCK_NAME VARCHAR2(40) NOT NULL,
+ PRIMARY KEY (LOCK_NAME)
+);
+
+
+INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
+INSERT INTO qrtz_locks values('JOB_ACCESS');
+INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
+INSERT INTO qrtz_locks values('STATE_ACCESS');
+INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
+
+commit;
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,162 +0,0 @@
--- Thanks to Patrick Lightbody for submitting this...
---
--- In your Quartz properties file, you'll need to set
--- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostreSQLDelegate
-
-drop table qrtz_job_listeners;
-drop table qrtz_trigger_listeners;
-drop table qrtz_fired_triggers;
-DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE QRTZ_SCHEDULER_STATE;
-DROP TABLE QRTZ_LOCKS;
-drop table qrtz_simple_triggers;
-drop table qrtz_cron_triggers;
-DROP TABLE QRTZ_BLOB_TRIGGERS;
-drop table qrtz_triggers;
-drop table qrtz_job_details;
-drop table qrtz_calendars;
-
-CREATE TABLE qrtz_job_details
- (
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- JOB_CLASS_NAME VARCHAR(128) NOT NULL,
- IS_DURABLE BOOL NOT NULL,
- IS_VOLATILE BOOL NOT NULL,
- IS_STATEFUL BOOL NOT NULL,
- REQUESTS_RECOVERY BOOL NOT NULL,
- JOB_DATA BYTEA NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_job_listeners
- (
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- JOB_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE BOOL NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- NEXT_FIRE_TIME BIGINT NULL,
- PREV_FIRE_TIME BIGINT NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT NOT NULL,
- END_TIME BIGINT NULL,
- CALENDAR_NAME VARCHAR(80) NULL,
- MISFIRE_INSTR SMALLINT NULL,
- JOB_DATA BYTEA NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_simple_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- REPEAT_COUNT BIGINT NOT NULL,
- REPEAT_INTERVAL BIGINT NOT NULL,
- TIMES_TRIGGERED BIGINT NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_cron_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- CRON_EXPRESSION VARCHAR(80) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_blob_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- BLOB_DATA BYTEA NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_trigger_listeners
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- TRIGGER_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-
-CREATE TABLE qrtz_calendars
- (
- CALENDAR_NAME VARCHAR(80) NOT NULL,
- CALENDAR BYTEA NOT NULL,
- PRIMARY KEY (CALENDAR_NAME)
-);
-
-
-CREATE TABLE qrtz_paused_trigger_grps
- (
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_fired_triggers
- (
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE BOOL NOT NULL,
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- FIRED_TIME BIGINT NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(80) NULL,
- JOB_GROUP VARCHAR(80) NULL,
- IS_STATEFUL BOOL NULL,
- REQUESTS_RECOVERY BOOL NULL,
- PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE qrtz_scheduler_state
- (
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- LAST_CHECKIN_TIME BIGINT NOT NULL,
- CHECKIN_INTERVAL BIGINT NOT NULL,
- RECOVERER VARCHAR(80) NULL,
- PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE qrtz_locks
- (
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (LOCK_NAME)
-);
-
-
-INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
-INSERT INTO qrtz_locks values('JOB_ACCESS');
-INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
-INSERT INTO qrtz_locks values('STATE_ACCESS');
-INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
-
-commit;
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,162 @@
+-- Thanks to Patrick Lightbody for submitting this...
+--
+-- In your Quartz properties file, you'll need to set
+-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostreSQLDelegate
+
+drop table qrtz_job_listeners;
+drop table qrtz_trigger_listeners;
+drop table qrtz_fired_triggers;
+DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE QRTZ_SCHEDULER_STATE;
+DROP TABLE QRTZ_LOCKS;
+drop table qrtz_simple_triggers;
+drop table qrtz_cron_triggers;
+DROP TABLE QRTZ_BLOB_TRIGGERS;
+drop table qrtz_triggers;
+drop table qrtz_job_details;
+drop table qrtz_calendars;
+
+CREATE TABLE qrtz_job_details
+ (
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ JOB_CLASS_NAME VARCHAR(128) NOT NULL,
+ IS_DURABLE BOOL NOT NULL,
+ IS_VOLATILE BOOL NOT NULL,
+ IS_STATEFUL BOOL NOT NULL,
+ REQUESTS_RECOVERY BOOL NOT NULL,
+ JOB_DATA BYTEA NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_job_listeners
+ (
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ JOB_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE BOOL NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ NEXT_FIRE_TIME BIGINT NULL,
+ PREV_FIRE_TIME BIGINT NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT NOT NULL,
+ END_TIME BIGINT NULL,
+ CALENDAR_NAME VARCHAR(80) NULL,
+ MISFIRE_INSTR SMALLINT NULL,
+ JOB_DATA BYTEA NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_simple_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ REPEAT_COUNT BIGINT NOT NULL,
+ REPEAT_INTERVAL BIGINT NOT NULL,
+ TIMES_TRIGGERED BIGINT NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_cron_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ CRON_EXPRESSION VARCHAR(80) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_blob_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ BLOB_DATA BYTEA NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_trigger_listeners
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ TRIGGER_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+
+CREATE TABLE qrtz_calendars
+ (
+ CALENDAR_NAME VARCHAR(80) NOT NULL,
+ CALENDAR BYTEA NOT NULL,
+ PRIMARY KEY (CALENDAR_NAME)
+);
+
+
+CREATE TABLE qrtz_paused_trigger_grps
+ (
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_fired_triggers
+ (
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE BOOL NOT NULL,
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ FIRED_TIME BIGINT NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(80) NULL,
+ JOB_GROUP VARCHAR(80) NULL,
+ IS_STATEFUL BOOL NULL,
+ REQUESTS_RECOVERY BOOL NULL,
+ PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE qrtz_scheduler_state
+ (
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT NOT NULL,
+ CHECKIN_INTERVAL BIGINT NOT NULL,
+ RECOVERER VARCHAR(80) NULL,
+ PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE qrtz_locks
+ (
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (LOCK_NAME)
+);
+
+
+INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
+INSERT INTO qrtz_locks values('JOB_ACCESS');
+INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
+INSERT INTO qrtz_locks values('STATE_ACCESS');
+INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
+
+commit;
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,162 +0,0 @@
--- Thanks to Patrick Lightbody for submitting this...
---
--- In your Quartz properties file, you'll need to set
--- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostreSQLDelegate
-
-drop table qrtz_job_listeners;
-drop table qrtz_trigger_listeners;
-drop table qrtz_fired_triggers;
-DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE QRTZ_SCHEDULER_STATE;
-DROP TABLE QRTZ_LOCKS;
-drop table qrtz_simple_triggers;
-drop table qrtz_cron_triggers;
-DROP TABLE QRTZ_BLOB_TRIGGERS;
-drop table qrtz_triggers;
-drop table qrtz_job_details;
-drop table qrtz_calendars;
-
-CREATE TABLE qrtz_job_details
- (
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- JOB_CLASS_NAME VARCHAR(128) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- IS_STATEFUL VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BYTEA NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_job_listeners
- (
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- JOB_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- NEXT_FIRE_TIME BIGINT NULL,
- PREV_FIRE_TIME BIGINT NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT NOT NULL,
- END_TIME BIGINT NULL,
- CALENDAR_NAME VARCHAR(80) NULL,
- MISFIRE_INSTR SMALLINT NULL,
- JOB_DATA BYTEA NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE qrtz_simple_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- REPEAT_COUNT BIGINT NOT NULL,
- REPEAT_INTERVAL BIGINT NOT NULL,
- TIMES_TRIGGERED BIGINT NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_cron_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- CRON_EXPRESSION VARCHAR(80) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_blob_triggers
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- BLOB_DATA BYTEA NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_trigger_listeners
- (
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- TRIGGER_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-
-CREATE TABLE qrtz_calendars
- (
- CALENDAR_NAME VARCHAR(80) NOT NULL,
- CALENDAR BYTEA NOT NULL,
- PRIMARY KEY (CALENDAR_NAME)
-);
-
-
-CREATE TABLE qrtz_paused_trigger_grps
- (
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE qrtz_fired_triggers
- (
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- FIRED_TIME BIGINT NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(80) NULL,
- JOB_GROUP VARCHAR(80) NULL,
- IS_STATEFUL VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE qrtz_scheduler_state
- (
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- LAST_CHECKIN_TIME BIGINT NOT NULL,
- CHECKIN_INTERVAL BIGINT NOT NULL,
- RECOVERER VARCHAR(80) NULL,
- PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE qrtz_locks
- (
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (LOCK_NAME)
-);
-
-
-INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
-INSERT INTO qrtz_locks values('JOB_ACCESS');
-INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
-INSERT INTO qrtz_locks values('STATE_ACCESS');
-INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
-
-commit;
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_postgres7.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,162 @@
+-- Thanks to Patrick Lightbody for submitting this...
+--
+-- In your Quartz properties file, you'll need to set
+-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostreSQLDelegate
+
+drop table qrtz_job_listeners;
+drop table qrtz_trigger_listeners;
+drop table qrtz_fired_triggers;
+DROP TABLE QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE QRTZ_SCHEDULER_STATE;
+DROP TABLE QRTZ_LOCKS;
+drop table qrtz_simple_triggers;
+drop table qrtz_cron_triggers;
+DROP TABLE QRTZ_BLOB_TRIGGERS;
+drop table qrtz_triggers;
+drop table qrtz_job_details;
+drop table qrtz_calendars;
+
+CREATE TABLE qrtz_job_details
+ (
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ JOB_CLASS_NAME VARCHAR(128) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ IS_STATEFUL VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BYTEA NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_job_listeners
+ (
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ JOB_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ NEXT_FIRE_TIME BIGINT NULL,
+ PREV_FIRE_TIME BIGINT NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT NOT NULL,
+ END_TIME BIGINT NULL,
+ CALENDAR_NAME VARCHAR(80) NULL,
+ MISFIRE_INSTR SMALLINT NULL,
+ JOB_DATA BYTEA NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE qrtz_simple_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ REPEAT_COUNT BIGINT NOT NULL,
+ REPEAT_INTERVAL BIGINT NOT NULL,
+ TIMES_TRIGGERED BIGINT NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_cron_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ CRON_EXPRESSION VARCHAR(80) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_blob_triggers
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ BLOB_DATA BYTEA NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_trigger_listeners
+ (
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ TRIGGER_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+
+CREATE TABLE qrtz_calendars
+ (
+ CALENDAR_NAME VARCHAR(80) NOT NULL,
+ CALENDAR BYTEA NOT NULL,
+ PRIMARY KEY (CALENDAR_NAME)
+);
+
+
+CREATE TABLE qrtz_paused_trigger_grps
+ (
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE qrtz_fired_triggers
+ (
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ FIRED_TIME BIGINT NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(80) NULL,
+ JOB_GROUP VARCHAR(80) NULL,
+ IS_STATEFUL VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE qrtz_scheduler_state
+ (
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT NOT NULL,
+ CHECKIN_INTERVAL BIGINT NOT NULL,
+ RECOVERER VARCHAR(80) NULL,
+ PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE qrtz_locks
+ (
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (LOCK_NAME)
+);
+
+
+INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
+INSERT INTO qrtz_locks values('JOB_ACCESS');
+INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
+INSERT INTO qrtz_locks values('STATE_ACCESS');
+INSERT INTO qrtz_locks values('MISFIRE_ACCESS');
+
+commit;
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,146 +0,0 @@
-#
-# Thanks to Andrew Perepelytsya for submitting this file.
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-CREATE TABLE QRTZ_JOB_DETAILS
-(
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- JOB_CLASS_NAME VARCHAR(128) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- IS_STATEFUL VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA LONG BYTE NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_JOB_LISTENERS
-(
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- JOB_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
- FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
-(
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- JOB_NAME VARCHAR(80) NOT NULL,
- JOB_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- NEXT_FIRE_TIME FIXED(13) NULL,
- PREV_FIRE_TIME FIXED(13) NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME FIXED(13) NOT NULL,
- END_TIME FIXED(13) NULL,
- CALENDAR_NAME VARCHAR(80) NULL,
- MISFIRE_INSTR FIXED(2) NULL,
- JOB_DATA LONG BYTE NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
-(
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- REPEAT_COUNT FIXED(7) NOT NULL,
- REPEAT_INTERVAL FIXED(12) NOT NULL,
- TIMES_TRIGGERED FIXED(7) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
-(
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- CRON_EXPRESSION VARCHAR(80) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
-(
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- BLOB_DATA LONG BYTE NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGER_LISTENERS
-(
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- TRIGGER_LISTENER VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
- FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
-(
- CALENDAR_NAME VARCHAR(80) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- DESCRIPTION VARCHAR(120) NULL,
- CALENDAR LONG BYTE NOT NULL,
- PRIMARY KEY (CALENDAR_NAME)
-);
-
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- PRIMARY KEY (TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(80) NOT NULL,
- TRIGGER_GROUP VARCHAR(80) NOT NULL,
- IS_VOLATILE VARCHAR(1) NOT NULL,
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- FIRED_TIME FIXED(13) NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(80) NULL,
- JOB_GROUP VARCHAR(80) NULL,
- IS_STATEFUL VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- INSTANCE_NAME VARCHAR(80) NOT NULL,
- LAST_CHECKIN_TIME FIXED(13) NOT NULL,
- CHECKIN_INTERVAL FIXED(13) NOT NULL,
- RECOVERER VARCHAR(80) NULL,
- PRIMARY KEY (INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (LOCK_NAME)
-);
-
-
-INSERT INTO QRTZ_LOCKS values('TRIGGER_ACCESS');
-INSERT INTO QRTZ_LOCKS values('JOB_ACCESS');
-INSERT INTO QRTZ_LOCKS values('CALENDAR_ACCESS');
-INSERT INTO QRTZ_LOCKS values('STATE_ACCESS');
-INSERT INTO QRTZ_LOCKS values('MISFIRE_ACCESS');
-
-commit;
-
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sapdb.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,146 @@
+#
+# Thanks to Andrew Perepelytsya for submitting this file.
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+CREATE TABLE QRTZ_JOB_DETAILS
+(
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ JOB_CLASS_NAME VARCHAR(128) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ IS_STATEFUL VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA LONG BYTE NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_JOB_LISTENERS
+(
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ JOB_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+(
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ JOB_NAME VARCHAR(80) NOT NULL,
+ JOB_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ NEXT_FIRE_TIME FIXED(13) NULL,
+ PREV_FIRE_TIME FIXED(13) NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME FIXED(13) NOT NULL,
+ END_TIME FIXED(13) NULL,
+ CALENDAR_NAME VARCHAR(80) NULL,
+ MISFIRE_INSTR FIXED(2) NULL,
+ JOB_DATA LONG BYTE NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+(
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ REPEAT_COUNT FIXED(7) NOT NULL,
+ REPEAT_INTERVAL FIXED(12) NOT NULL,
+ TIMES_TRIGGERED FIXED(7) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+(
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ CRON_EXPRESSION VARCHAR(80) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+(
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ BLOB_DATA LONG BYTE NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGER_LISTENERS
+(
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ TRIGGER_LISTENER VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER),
+ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+(
+ CALENDAR_NAME VARCHAR(80) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ DESCRIPTION VARCHAR(120) NULL,
+ CALENDAR LONG BYTE NOT NULL,
+ PRIMARY KEY (CALENDAR_NAME)
+);
+
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ PRIMARY KEY (TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(80) NOT NULL,
+ TRIGGER_GROUP VARCHAR(80) NOT NULL,
+ IS_VOLATILE VARCHAR(1) NOT NULL,
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ FIRED_TIME FIXED(13) NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(80) NULL,
+ JOB_GROUP VARCHAR(80) NULL,
+ IS_STATEFUL VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ INSTANCE_NAME VARCHAR(80) NOT NULL,
+ LAST_CHECKIN_TIME FIXED(13) NOT NULL,
+ CHECKIN_INTERVAL FIXED(13) NOT NULL,
+ RECOVERER VARCHAR(80) NULL,
+ PRIMARY KEY (INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (LOCK_NAME)
+);
+
+
+INSERT INTO QRTZ_LOCKS values('TRIGGER_ACCESS');
+INSERT INTO QRTZ_LOCKS values('JOB_ACCESS');
+INSERT INTO QRTZ_LOCKS values('CALENDAR_ACCESS');
+INSERT INTO QRTZ_LOCKS values('STATE_ACCESS');
+INSERT INTO QRTZ_LOCKS values('MISFIRE_ACCESS');
+
+commit;
+
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,351 +0,0 @@
---# thanks to George Papastamatopoulos for submitting this ... and Marko Lahma for
---# updating it.
---#
---# In your Quartz properties file, you'll need to set
---# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
---#
---# you shouse enter your DB instance's name on the next line in place of "enter_db_name_here"
---#
---#
---# From a helpful (but anonymous) Quartz user:
---#
---# Regarding this error message:
---#
---# [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
---#
---#
---# I added "SelectMethod=cursor;" to my Connection URL in the config file.
---# It Seems to work, hopefully no side effects.
---#
---# example:
---# "jdbc:microsoft:sqlserver://dbmachine:1433;SelectMethod=cursor";
---#
---# Another user has pointed out that you will probably need to use the
---# JTDS driver
---#
-
-USE [enter_db_name_here]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_JOB_LISTENERS_QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
-ALTER TABLE [dbo].[QRTZ_JOB_LISTENERS] DROP CONSTRAINT FK_QRTZ_JOB_LISTENERS_QRTZ_JOB_DETAILS
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
-ALTER TABLE [dbo].[QRTZ_TRIGGERS] DROP CONSTRAINT FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
-ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] DROP CONSTRAINT FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
-ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_TRIGGER_LISTENERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
-ALTER TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] DROP CONSTRAINT FK_QRTZ_TRIGGER_LISTENERS_QRTZ_TRIGGERS
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_CALENDARS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_LOCKS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_JOB_DETAILS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_LISTENERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_JOB_LISTENERS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGER_LISTENERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_TRIGGER_LISTENERS]
-GO
-
-IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
-DROP TABLE [dbo].[QRTZ_TRIGGERS]
-GO
-
-CREATE TABLE [dbo].[QRTZ_CALENDARS] (
- [CALENDAR_NAME] [VARCHAR] (80) NOT NULL ,
- [CALENDAR] [IMAGE] NOT NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] (
- [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
- [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
- [CRON_EXPRESSION] [VARCHAR] (80) NOT NULL ,
- [TIME_ZONE_ID] [VARCHAR] (80)
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] (
- [ENTRY_ID] [VARCHAR] (95) NOT NULL ,
- [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
- [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
- [IS_VOLATILE] [VARCHAR] (1) NOT NULL ,
- [INSTANCE_NAME] [VARCHAR] (80) NOT NULL ,
- [FIRED_TIME] [BIGINT] NOT NULL ,
- [STATE] [VARCHAR] (16) NOT NULL,
- [JOB_NAME] [VARCHAR] (80) NULL ,
- [JOB_GROUP] [VARCHAR] (80) NULL ,
- [IS_STATEFUL] [VARCHAR] (1) NULL ,
- [REQUESTS_RECOVERY] [VARCHAR] (1) NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] (
- [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_SCHEDULER_STATE] (
- [INSTANCE_NAME] [VARCHAR] (80) NOT NULL ,
- [LAST_CHECKIN_TIME] [BIGINT] NOT NULL ,
- [CHECKIN_INTERVAL] [BIGINT] NOT NULL ,
- [RECOVERER] [VARCHAR] (80) NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_LOCKS] (
- [LOCK_NAME] [VARCHAR] (40) NOT NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] (
- [JOB_NAME] [VARCHAR] (80) NOT NULL ,
- [JOB_GROUP] [VARCHAR] (80) NOT NULL ,
- [DESCRIPTION] [VARCHAR] (120) NULL ,
- [JOB_CLASS_NAME] [VARCHAR] (128) NOT NULL ,
- [IS_DURABLE] [VARCHAR] (1) NOT NULL ,
- [IS_VOLATILE] [VARCHAR] (1) NOT NULL ,
- [IS_STATEFUL] [VARCHAR] (1) NOT NULL ,
- [REQUESTS_RECOVERY] [VARCHAR] (1) NOT NULL ,
- [JOB_DATA] [IMAGE] NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_JOB_LISTENERS] (
- [JOB_NAME] [VARCHAR] (80) NOT NULL ,
- [JOB_GROUP] [VARCHAR] (80) NOT NULL ,
- [JOB_LISTENER] [VARCHAR] (80) NOT NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] (
- [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
- [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
- [REPEAT_COUNT] [BIGINT] NOT NULL ,
- [REPEAT_INTERVAL] [BIGINT] NOT NULL ,
- [TIMES_TRIGGERED] [BIGINT] NOT NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_BLOB_TRIGGERS] (
- [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
- [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
- [BLOB_DATA] [IMAGE] NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] (
- [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
- [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
- [TRIGGER_LISTENER] [VARCHAR] (80) NOT NULL
-) ON [PRIMARY]
-GO
-
-CREATE TABLE [dbo].[QRTZ_TRIGGERS] (
- [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
- [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
- [JOB_NAME] [VARCHAR] (80) NOT NULL ,
- [JOB_GROUP] [VARCHAR] (80) NOT NULL ,
- [IS_VOLATILE] [VARCHAR] (1) NOT NULL ,
- [DESCRIPTION] [VARCHAR] (120) NULL ,
- [NEXT_FIRE_TIME] [BIGINT] NULL ,
- [PREV_FIRE_TIME] [BIGINT] NULL ,
- [TRIGGER_STATE] [VARCHAR] (16) NOT NULL ,
- [TRIGGER_TYPE] [VARCHAR] (8) NOT NULL ,
- [START_TIME] [BIGINT] NOT NULL ,
- [END_TIME] [BIGINT] NULL ,
- [CALENDAR_NAME] [VARCHAR] (80) NULL ,
- [MISFIRE_INSTR] [SMALLINT] NULL ,
- [JOB_DATA] [IMAGE] NULL
-) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_CALENDARS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_CALENDARS] PRIMARY KEY CLUSTERED
- (
- [CALENDAR_NAME]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_CRON_TRIGGERS] PRIMARY KEY CLUSTERED
- (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_FIRED_TRIGGERS] PRIMARY KEY CLUSTERED
- (
- [ENTRY_ID]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_PAUSED_TRIGGER_GRPS] PRIMARY KEY CLUSTERED
- (
- [TRIGGER_GROUP]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_SCHEDULER_STATE] PRIMARY KEY CLUSTERED
- (
- [INSTANCE_NAME]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_LOCKS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_LOCKS] PRIMARY KEY CLUSTERED
- (
- [LOCK_NAME]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_JOB_DETAILS] PRIMARY KEY CLUSTERED
- (
- [JOB_NAME],
- [JOB_GROUP]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_JOB_LISTENERS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_JOB_LISTENERS] PRIMARY KEY CLUSTERED
- (
- [JOB_NAME],
- [JOB_GROUP],
- [JOB_LISTENER]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_SIMPLE_TRIGGERS] PRIMARY KEY CLUSTERED
- (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_TRIGGER_LISTENERS] PRIMARY KEY CLUSTERED
- (
- [TRIGGER_NAME],
- [TRIGGER_GROUP],
- [TRIGGER_LISTENER]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_TRIGGERS] WITH NOCHECK ADD
- CONSTRAINT [PK_QRTZ_TRIGGERS] PRIMARY KEY CLUSTERED
- (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD
- CONSTRAINT [FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY
- (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) REFERENCES [dbo].[QRTZ_TRIGGERS] (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) ON DELETE CASCADE
-GO
-
-ALTER TABLE [dbo].[QRTZ_JOB_LISTENERS] ADD
- CONSTRAINT [FK_QRTZ_JOB_LISTENERS_QRTZ_JOB_DETAILS] FOREIGN KEY
- (
- [JOB_NAME],
- [JOB_GROUP]
- ) REFERENCES [dbo].[QRTZ_JOB_DETAILS] (
- [JOB_NAME],
- [JOB_GROUP]
- ) ON DELETE CASCADE
-GO
-
-ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD
- CONSTRAINT [FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY
- (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) REFERENCES [dbo].[QRTZ_TRIGGERS] (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) ON DELETE CASCADE
-GO
-
-ALTER TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] ADD
- CONSTRAINT [FK_QRTZ_TRIGGER_LISTENERS_QRTZ_TRIGGERS] FOREIGN KEY
- (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) REFERENCES [dbo].[QRTZ_TRIGGERS] (
- [TRIGGER_NAME],
- [TRIGGER_GROUP]
- ) ON DELETE CASCADE
-GO
-
-ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD
- CONSTRAINT [FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] FOREIGN KEY
- (
- [JOB_NAME],
- [JOB_GROUP]
- ) REFERENCES [dbo].[QRTZ_JOB_DETAILS] (
- [JOB_NAME],
- [JOB_GROUP]
- )
-GO
-
-INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('TRIGGER_ACCESS');
-INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('JOB_ACCESS');
-INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('CALENDAR_ACCESS');
-INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('STATE_ACCESS');
-INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('MISFIRE_ACCESS');
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sqlServer.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,351 @@
+--# thanks to George Papastamatopoulos for submitting this ... and Marko Lahma for
+--# updating it.
+--#
+--# In your Quartz properties file, you'll need to set
+--# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
+--#
+--# you shouse enter your DB instance's name on the next line in place of "enter_db_name_here"
+--#
+--#
+--# From a helpful (but anonymous) Quartz user:
+--#
+--# Regarding this error message:
+--#
+--# [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
+--#
+--#
+--# I added "SelectMethod=cursor;" to my Connection URL in the config file.
+--# It Seems to work, hopefully no side effects.
+--#
+--# example:
+--# "jdbc:microsoft:sqlserver://dbmachine:1433;SelectMethod=cursor";
+--#
+--# Another user has pointed out that you will probably need to use the
+--# JTDS driver
+--#
+
+USE [enter_db_name_here]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_JOB_LISTENERS_QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
+ALTER TABLE [dbo].[QRTZ_JOB_LISTENERS] DROP CONSTRAINT FK_QRTZ_JOB_LISTENERS_QRTZ_JOB_DETAILS
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
+ALTER TABLE [dbo].[QRTZ_TRIGGERS] DROP CONSTRAINT FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
+ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] DROP CONSTRAINT FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
+ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_TRIGGER_LISTENERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1)
+ALTER TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] DROP CONSTRAINT FK_QRTZ_TRIGGER_LISTENERS_QRTZ_TRIGGERS
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_CALENDARS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_LOCKS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_JOB_DETAILS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_LISTENERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_JOB_LISTENERS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGER_LISTENERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_TRIGGER_LISTENERS]
+GO
+
+IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1)
+DROP TABLE [dbo].[QRTZ_TRIGGERS]
+GO
+
+CREATE TABLE [dbo].[QRTZ_CALENDARS] (
+ [CALENDAR_NAME] [VARCHAR] (80) NOT NULL ,
+ [CALENDAR] [IMAGE] NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] (
+ [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
+ [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
+ [CRON_EXPRESSION] [VARCHAR] (80) NOT NULL ,
+ [TIME_ZONE_ID] [VARCHAR] (80)
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] (
+ [ENTRY_ID] [VARCHAR] (95) NOT NULL ,
+ [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
+ [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
+ [IS_VOLATILE] [VARCHAR] (1) NOT NULL ,
+ [INSTANCE_NAME] [VARCHAR] (80) NOT NULL ,
+ [FIRED_TIME] [BIGINT] NOT NULL ,
+ [STATE] [VARCHAR] (16) NOT NULL,
+ [JOB_NAME] [VARCHAR] (80) NULL ,
+ [JOB_GROUP] [VARCHAR] (80) NULL ,
+ [IS_STATEFUL] [VARCHAR] (1) NULL ,
+ [REQUESTS_RECOVERY] [VARCHAR] (1) NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] (
+ [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_SCHEDULER_STATE] (
+ [INSTANCE_NAME] [VARCHAR] (80) NOT NULL ,
+ [LAST_CHECKIN_TIME] [BIGINT] NOT NULL ,
+ [CHECKIN_INTERVAL] [BIGINT] NOT NULL ,
+ [RECOVERER] [VARCHAR] (80) NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_LOCKS] (
+ [LOCK_NAME] [VARCHAR] (40) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] (
+ [JOB_NAME] [VARCHAR] (80) NOT NULL ,
+ [JOB_GROUP] [VARCHAR] (80) NOT NULL ,
+ [DESCRIPTION] [VARCHAR] (120) NULL ,
+ [JOB_CLASS_NAME] [VARCHAR] (128) NOT NULL ,
+ [IS_DURABLE] [VARCHAR] (1) NOT NULL ,
+ [IS_VOLATILE] [VARCHAR] (1) NOT NULL ,
+ [IS_STATEFUL] [VARCHAR] (1) NOT NULL ,
+ [REQUESTS_RECOVERY] [VARCHAR] (1) NOT NULL ,
+ [JOB_DATA] [IMAGE] NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_JOB_LISTENERS] (
+ [JOB_NAME] [VARCHAR] (80) NOT NULL ,
+ [JOB_GROUP] [VARCHAR] (80) NOT NULL ,
+ [JOB_LISTENER] [VARCHAR] (80) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] (
+ [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
+ [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
+ [REPEAT_COUNT] [BIGINT] NOT NULL ,
+ [REPEAT_INTERVAL] [BIGINT] NOT NULL ,
+ [TIMES_TRIGGERED] [BIGINT] NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_BLOB_TRIGGERS] (
+ [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
+ [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
+ [BLOB_DATA] [IMAGE] NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] (
+ [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
+ [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
+ [TRIGGER_LISTENER] [VARCHAR] (80) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[QRTZ_TRIGGERS] (
+ [TRIGGER_NAME] [VARCHAR] (80) NOT NULL ,
+ [TRIGGER_GROUP] [VARCHAR] (80) NOT NULL ,
+ [JOB_NAME] [VARCHAR] (80) NOT NULL ,
+ [JOB_GROUP] [VARCHAR] (80) NOT NULL ,
+ [IS_VOLATILE] [VARCHAR] (1) NOT NULL ,
+ [DESCRIPTION] [VARCHAR] (120) NULL ,
+ [NEXT_FIRE_TIME] [BIGINT] NULL ,
+ [PREV_FIRE_TIME] [BIGINT] NULL ,
+ [TRIGGER_STATE] [VARCHAR] (16) NOT NULL ,
+ [TRIGGER_TYPE] [VARCHAR] (8) NOT NULL ,
+ [START_TIME] [BIGINT] NOT NULL ,
+ [END_TIME] [BIGINT] NULL ,
+ [CALENDAR_NAME] [VARCHAR] (80) NULL ,
+ [MISFIRE_INSTR] [SMALLINT] NULL ,
+ [JOB_DATA] [IMAGE] NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_CALENDARS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_CALENDARS] PRIMARY KEY CLUSTERED
+ (
+ [CALENDAR_NAME]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_CRON_TRIGGERS] PRIMARY KEY CLUSTERED
+ (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_FIRED_TRIGGERS] PRIMARY KEY CLUSTERED
+ (
+ [ENTRY_ID]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_PAUSED_TRIGGER_GRPS] PRIMARY KEY CLUSTERED
+ (
+ [TRIGGER_GROUP]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_SCHEDULER_STATE] PRIMARY KEY CLUSTERED
+ (
+ [INSTANCE_NAME]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_LOCKS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_LOCKS] PRIMARY KEY CLUSTERED
+ (
+ [LOCK_NAME]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_JOB_DETAILS] PRIMARY KEY CLUSTERED
+ (
+ [JOB_NAME],
+ [JOB_GROUP]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_JOB_LISTENERS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_JOB_LISTENERS] PRIMARY KEY CLUSTERED
+ (
+ [JOB_NAME],
+ [JOB_GROUP],
+ [JOB_LISTENER]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_SIMPLE_TRIGGERS] PRIMARY KEY CLUSTERED
+ (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_TRIGGER_LISTENERS] PRIMARY KEY CLUSTERED
+ (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP],
+ [TRIGGER_LISTENER]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_TRIGGERS] WITH NOCHECK ADD
+ CONSTRAINT [PK_QRTZ_TRIGGERS] PRIMARY KEY CLUSTERED
+ (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD
+ CONSTRAINT [FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY
+ (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) REFERENCES [dbo].[QRTZ_TRIGGERS] (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) ON DELETE CASCADE
+GO
+
+ALTER TABLE [dbo].[QRTZ_JOB_LISTENERS] ADD
+ CONSTRAINT [FK_QRTZ_JOB_LISTENERS_QRTZ_JOB_DETAILS] FOREIGN KEY
+ (
+ [JOB_NAME],
+ [JOB_GROUP]
+ ) REFERENCES [dbo].[QRTZ_JOB_DETAILS] (
+ [JOB_NAME],
+ [JOB_GROUP]
+ ) ON DELETE CASCADE
+GO
+
+ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD
+ CONSTRAINT [FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY
+ (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) REFERENCES [dbo].[QRTZ_TRIGGERS] (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) ON DELETE CASCADE
+GO
+
+ALTER TABLE [dbo].[QRTZ_TRIGGER_LISTENERS] ADD
+ CONSTRAINT [FK_QRTZ_TRIGGER_LISTENERS_QRTZ_TRIGGERS] FOREIGN KEY
+ (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) REFERENCES [dbo].[QRTZ_TRIGGERS] (
+ [TRIGGER_NAME],
+ [TRIGGER_GROUP]
+ ) ON DELETE CASCADE
+GO
+
+ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD
+ CONSTRAINT [FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] FOREIGN KEY
+ (
+ [JOB_NAME],
+ [JOB_GROUP]
+ ) REFERENCES [dbo].[QRTZ_JOB_DETAILS] (
+ [JOB_NAME],
+ [JOB_GROUP]
+ )
+GO
+
+INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('TRIGGER_ACCESS');
+INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('JOB_ACCESS');
+INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('CALENDAR_ACCESS');
+INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('STATE_ACCESS');
+INSERT INTO [dbo].[QRTZ_LOCKS] VALUES('MISFIRE_ACCESS');
Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql
===================================================================
--- labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql 2009-06-22 15:11:49 UTC (rev 27070)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -1,313 +0,0 @@
-/*==============================================================================================*/
-/* Quartz database tables creation script for Sybase ASE 12.5 */
-/* Written by Pertti Laiho (email: pertti.laiho at deio.net), 9th May 2003 */
-/* */
-/* Compatible with Quartz version 1.1.2 */
-/* */
-/* Sybase ASE works ok with the MSSQL delegate class. That means in your Quartz properties */
-/* file, you'll need to set: */
-/* org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate */
-/*==============================================================================================*/
-
-use your_db_name_here
-go
-
-/*==============================================================================*/
-/* Clear all tables: */
-/*==============================================================================*/
-
-delete from QRTZ_JOB_LISTENERS
-go
-delete from QRTZ_TRIGGER_LISTENERS
-go
-delete from QRTZ_FIRED_TRIGGERS
-go
-delete from QRTZ_PAUSED_TRIGGER_GRPS
-go
-delete from QRTZ_SCHEDULER_STATE
-go
-delete from QRTZ_LOCKS
-go
-delete from QRTZ_SIMPLE_TRIGGERS
-go
-delete from QRTZ_CRON_TRIGGERS
-go
-delete from QRTZ_BLOB_TRIGGERS
-go
-delete from QRTZ_TRIGGERS
-go
-delete from QRTZ_JOB_DETAILS
-go
-delete from QRTZ_CALENDARS
-go
-
-/*==============================================================================*/
-/* Drop constraints: */
-/*==============================================================================*/
-
-alter table QRTZ_JOB_LISTENERS
-drop constraint FK_job_listeners_job_details
-go
-
-alter table QRTZ_TRIGGERS
-drop constraint FK_triggers_job_details
-go
-
-alter table QRTZ_CRON_TRIGGERS
-drop constraint FK_cron_triggers_triggers
-go
-
-alter table QRTZ_SIMPLE_TRIGGERS
-drop constraint FK_simple_triggers_triggers
-go
-
-alter table QRTZ_TRIGGER_LISTENERS
-drop constraint FK_trigger_listeners_triggers
-go
-
-alter table QRTZ_BLOB_TRIGGERS
-drop constraint FK_blob_triggers_triggers
-go
-
-/*==============================================================================*/
-/* Drop tables: */
-/*==============================================================================*/
-
-drop table QRTZ_JOB_LISTENERS
-go
-drop table QRTZ_TRIGGER_LISTENERS
-go
-drop table QRTZ_FIRED_TRIGGERS
-go
-drop table QRTZ_PAUSED_TRIGGER_GRPS
-go
-drop table QRTZ_SCHEDULER_STATE
-go
-drop table QRTZ_LOCKS
-go
-drop table QRTZ_SIMPLE_TRIGGERS
-go
-drop table QRTZ_CRON_TRIGGERS
-go
-drop table QRTZ_BLOB_TRIGGERS
-go
-drop table QRTZ_TRIGGERS
-go
-drop table QRTZ_JOB_DETAILS
-go
-drop table QRTZ_CALENDARS
-go
-
-/*==============================================================================*/
-/* Create tables: */
-/*==============================================================================*/
-
-create table QRTZ_CALENDARS (
-CALENDAR_NAME varchar(80) not null,
-CALENDAR image not null
-)
-go
-
-create table QRTZ_CRON_TRIGGERS (
-TRIGGER_NAME varchar(80) not null,
-TRIGGER_GROUP varchar(80) not null,
-CRON_EXPRESSION varchar(80) not null,
-TIME_ZONE_ID varchar(80) null,
-)
-go
-
-create table QRTZ_PAUSED_TRIGGER_GRPS (
-TRIGGER_GROUP varchar(80) not null,
-)
-go
-
-create table QRTZ_FIRED_TRIGGERS(
-ENTRY_ID varchar(95) not null,
-TRIGGER_NAME varchar(80) not null,
-TRIGGER_GROUP varchar(80) not null,
-IS_VOLATILE bit not null,
-INSTANCE_NAME varchar(80) not null,
-FIRED_TIME numeric(13,0) not null,
-STATE varchar(16) not null,
-JOB_NAME varchar(80) null,
-JOB_GROUP varchar(80) null,
-IS_STATEFUL bit not null,
-REQUESTS_RECOVERY bit not null,
-)
-go
-
-create table QRTZ_SCHEDULER_STATE (
-INSTANCE_NAME varchar(80) not null,
-LAST_CHECKIN_TIME numeric(13,0) not null,
-CHECKIN_INTERVAL numeric(13,0) not null,
-RECOVERER varchar(80) null,
-)
-go
-
-create table QRTZ_LOCKS (
-LOCK_NAME varchar(40) not null,
-)
-go
-
-insert into QRTZ_LOCKS values('TRIGGER_ACCESS')
-go
-insert into QRTZ_LOCKS values('JOB_ACCESS')
-go
-insert into QRTZ_LOCKS values('CALENDAR_ACCESS')
-go
-insert into QRTZ_LOCKS values('STATE_ACCESS')
-go
-
-
-create table QRTZ_JOB_DETAILS (
-JOB_NAME varchar(80) not null,
-JOB_GROUP varchar(80) not null,
-DESCRIPTION varchar(120) null,
-JOB_CLASS_NAME varchar(128) not null,
-IS_DURABLE bit not null,
-IS_VOLATILE bit not null,
-IS_STATEFUL bit not null,
-REQUESTS_RECOVERY bit not null,
-JOB_DATA image null
-)
-go
-
-create table QRTZ_JOB_LISTENERS (
-JOB_NAME varchar(80) not null,
-JOB_GROUP varchar(80) not null,
-JOB_LISTENER varchar(80) not null
-)
-go
-
-create table QRTZ_SIMPLE_TRIGGERS (
-TRIGGER_NAME varchar(80) not null,
-TRIGGER_GROUP varchar(80) not null,
-REPEAT_COUNT numeric(13,0) not null,
-REPEAT_INTERVAL numeric(13,0) not null,
-TIMES_TRIGGERED numeric(13,0) not null
-)
-go
-
-create table QRTZ_BLOB_TRIGGERS (
-TRIGGER_NAME varchar(80) not null,
-TRIGGER_GROUP varchar(80) not null,
-BLOB_DATA image null
-)
-go
-
-create table QRTZ_TRIGGER_LISTENERS (
-TRIGGER_NAME varchar(80) not null,
-TRIGGER_GROUP varchar(80) not null,
-TRIGGER_LISTENER varchar(80) not null
-)
-go
-
-create table QRTZ_TRIGGERS (
-TRIGGER_NAME varchar(80) not null,
-TRIGGER_GROUP varchar(80) not null,
-JOB_NAME varchar(80) not null,
-JOB_GROUP varchar(80) not null,
-IS_VOLATILE bit not null,
-DESCRIPTION varchar(120) null,
-NEXT_FIRE_TIME numeric(13,0) null,
-PREV_FIRE_TIME numeric(13,0) null,
-TRIGGER_STATE varchar(16) not null,
-TRIGGER_TYPE varchar(8) not null,
-START_TIME numeric(13,0) not null,
-END_TIME numeric(13,0) null,
-CALENDAR_NAME varchar(80) null,
-MISFIRE_INSTR smallint null
-JOB_DATA image null
-)
-go
-
-/*==============================================================================*/
-/* Create primary key constraints: */
-/*==============================================================================*/
-
-alter table QRTZ_CALENDARS
-add constraint PK_qrtz_calendars primary key clustered (CALENDAR_NAME)
-go
-
-alter table QRTZ_CRON_TRIGGERS
-add constraint PK_qrtz_cron_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
-go
-
-alter table QRTZ_FIRED_TRIGGERS
-add constraint PK_qrtz_fired_triggers primary key clustered (ENTRY_ID)
-go
-
-alter table QRTZ_PAUSED_TRIGGER_GRPS
-add constraint PK_qrtz_paused_trigger_grps primary key clustered (TRIGGER_GROUP)
-go
-
-alter table QRTZ_SCHEDULER_STATE
-add constraint PK_qrtz_scheduler_state primary key clustered (INSTANCE_NAME)
-go
-
-alter table QRTZ_LOCKS
-add constraint PK_qrtz_locks primary key clustered (LOCK_NAME)
-go
-
-alter table QRTZ_JOB_DETAILS
-add constraint PK_qrtz_job_details primary key clustered (JOB_NAME, JOB_GROUP)
-go
-
-alter table QRTZ_JOB_LISTENERS
-add constraint PK_qrtz_job_listeners primary key clustered (JOB_NAME, JOB_GROUP, JOB_LISTENER)
-go
-
-alter table QRTZ_SIMPLE_TRIGGERS
-add constraint PK_qrtz_simple_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
-go
-
-alter table QRTZ_TRIGGER_LISTENERS
-add constraint PK_qrtz_trigger_listeners primary key clustered (TRIGGER_NAME, TRIGGER_GROUP, TRIGGER_LISTENER)
-go
-
-alter table QRTZ_TRIGGERS
-add constraint PK_qrtz_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
-go
-
-alter table QRTZ_BLOB_TRIGGERS
-add constraint PK_qrtz_blob_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
-go
-
-
-/*==============================================================================*/
-/* Create foreign key constraints: */
-/*==============================================================================*/
-
-alter table QRTZ_CRON_TRIGGERS
-add constraint FK_cron_triggers_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
-references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
-go
-
-alter table QRTZ_JOB_LISTENERS
-add constraint FK_job_listeners_job_details foreign key (JOB_NAME,JOB_GROUP)
-references QRTZ_JOB_DETAILS (JOB_NAME,JOB_GROUP)
-go
-
-alter table QRTZ_SIMPLE_TRIGGERS
-add constraint FK_simple_triggers_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
-references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
-go
-
-alter table QRTZ_TRIGGER_LISTENERS
-add constraint FK_trigger_listeners_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
-references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
-go
-
-alter table QRTZ_TRIGGERS
-add constraint FK_triggers_job_details foreign key (JOB_NAME,JOB_GROUP)
-references QRTZ_JOB_DETAILS (JOB_NAME,JOB_GROUP)
-go
-
-alter table QRTZ_BLOB_TRIGGERS
-add constraint FK_blob_triggers_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
-references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
-go
-
-/*==============================================================================*/
-/* End of script. */
-/*==============================================================================*/
Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql (from rev 27070, labs/jbossesb/workspace/jbpm_inflow/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/quartz-sql/tables_sybase.sql 2009-06-25 14:46:50 UTC (rev 27131)
@@ -0,0 +1,313 @@
+/*==============================================================================================*/
+/* Quartz database tables creation script for Sybase ASE 12.5 */
+/* Written by Pertti Laiho (email: pertti.laiho at deio.net), 9th May 2003 */
+/* */
+/* Compatible with Quartz version 1.1.2 */
+/* */
+/* Sybase ASE works ok with the MSSQL delegate class. That means in your Quartz properties */
+/* file, you'll need to set: */
+/* org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate */
+/*==============================================================================================*/
+
+use your_db_name_here
+go
+
+/*==============================================================================*/
+/* Clear all tables: */
+/*==============================================================================*/
+
+delete from QRTZ_JOB_LISTENERS
+go
+delete from QRTZ_TRIGGER_LISTENERS
+go
+delete from QRTZ_FIRED_TRIGGERS
+go
+delete from QRTZ_PAUSED_TRIGGER_GRPS
+go
+delete from QRTZ_SCHEDULER_STATE
+go
+delete from QRTZ_LOCKS
+go
+delete from QRTZ_SIMPLE_TRIGGERS
+go
+delete from QRTZ_CRON_TRIGGERS
+go
+delete from QRTZ_BLOB_TRIGGERS
+go
+delete from QRTZ_TRIGGERS
+go
+delete from QRTZ_JOB_DETAILS
+go
+delete from QRTZ_CALENDARS
+go
+
+/*==============================================================================*/
+/* Drop constraints: */
+/*==============================================================================*/
+
+alter table QRTZ_JOB_LISTENERS
+drop constraint FK_job_listeners_job_details
+go
+
+alter table QRTZ_TRIGGERS
+drop constraint FK_triggers_job_details
+go
+
+alter table QRTZ_CRON_TRIGGERS
+drop constraint FK_cron_triggers_triggers
+go
+
+alter table QRTZ_SIMPLE_TRIGGERS
+drop constraint FK_simple_triggers_triggers
+go
+
+alter table QRTZ_TRIGGER_LISTENERS
+drop constraint FK_trigger_listeners_triggers
+go
+
+alter table QRTZ_BLOB_TRIGGERS
+drop constraint FK_blob_triggers_triggers
+go
+
+/*==============================================================================*/
+/* Drop tables: */
+/*==============================================================================*/
+
+drop table QRTZ_JOB_LISTENERS
+go
+drop table QRTZ_TRIGGER_LISTENERS
+go
+drop table QRTZ_FIRED_TRIGGERS
+go
+drop table QRTZ_PAUSED_TRIGGER_GRPS
+go
+drop table QRTZ_SCHEDULER_STATE
+go
+drop table QRTZ_LOCKS
+go
+drop table QRTZ_SIMPLE_TRIGGERS
+go
+drop table QRTZ_CRON_TRIGGERS
+go
+drop table QRTZ_BLOB_TRIGGERS
+go
+drop table QRTZ_TRIGGERS
+go
+drop table QRTZ_JOB_DETAILS
+go
+drop table QRTZ_CALENDARS
+go
+
+/*==============================================================================*/
+/* Create tables: */
+/*==============================================================================*/
+
+create table QRTZ_CALENDARS (
+CALENDAR_NAME varchar(80) not null,
+CALENDAR image not null
+)
+go
+
+create table QRTZ_CRON_TRIGGERS (
+TRIGGER_NAME varchar(80) not null,
+TRIGGER_GROUP varchar(80) not null,
+CRON_EXPRESSION varchar(80) not null,
+TIME_ZONE_ID varchar(80) null,
+)
+go
+
+create table QRTZ_PAUSED_TRIGGER_GRPS (
+TRIGGER_GROUP varchar(80) not null,
+)
+go
+
+create table QRTZ_FIRED_TRIGGERS(
+ENTRY_ID varchar(95) not null,
+TRIGGER_NAME varchar(80) not null,
+TRIGGER_GROUP varchar(80) not null,
+IS_VOLATILE bit not null,
+INSTANCE_NAME varchar(80) not null,
+FIRED_TIME numeric(13,0) not null,
+STATE varchar(16) not null,
+JOB_NAME varchar(80) null,
+JOB_GROUP varchar(80) null,
+IS_STATEFUL bit not null,
+REQUESTS_RECOVERY bit not null,
+)
+go
+
+create table QRTZ_SCHEDULER_STATE (
+INSTANCE_NAME varchar(80) not null,
+LAST_CHECKIN_TIME numeric(13,0) not null,
+CHECKIN_INTERVAL numeric(13,0) not null,
+RECOVERER varchar(80) null,
+)
+go
+
+create table QRTZ_LOCKS (
+LOCK_NAME varchar(40) not null,
+)
+go
+
+insert into QRTZ_LOCKS values('TRIGGER_ACCESS')
+go
+insert into QRTZ_LOCKS values('JOB_ACCESS')
+go
+insert into QRTZ_LOCKS values('CALENDAR_ACCESS')
+go
+insert into QRTZ_LOCKS values('STATE_ACCESS')
+go
+
+
+create table QRTZ_JOB_DETAILS (
+JOB_NAME varchar(80) not null,
+JOB_GROUP varchar(80) not null,
+DESCRIPTION varchar(120) null,
+JOB_CLASS_NAME varchar(128) not null,
+IS_DURABLE bit not null,
+IS_VOLATILE bit not null,
+IS_STATEFUL bit not null,
+REQUESTS_RECOVERY bit not null,
+JOB_DATA image null
+)
+go
+
+create table QRTZ_JOB_LISTENERS (
+JOB_NAME varchar(80) not null,
+JOB_GROUP varchar(80) not null,
+JOB_LISTENER varchar(80) not null
+)
+go
+
+create table QRTZ_SIMPLE_TRIGGERS (
+TRIGGER_NAME varchar(80) not null,
+TRIGGER_GROUP varchar(80) not null,
+REPEAT_COUNT numeric(13,0) not null,
+REPEAT_INTERVAL numeric(13,0) not null,
+TIMES_TRIGGERED numeric(13,0) not null
+)
+go
+
+create table QRTZ_BLOB_TRIGGERS (
+TRIGGER_NAME varchar(80) not null,
+TRIGGER_GROUP varchar(80) not null,
+BLOB_DATA image null
+)
+go
+
+create table QRTZ_TRIGGER_LISTENERS (
+TRIGGER_NAME varchar(80) not null,
+TRIGGER_GROUP varchar(80) not null,
+TRIGGER_LISTENER varchar(80) not null
+)
+go
+
+create table QRTZ_TRIGGERS (
+TRIGGER_NAME varchar(80) not null,
+TRIGGER_GROUP varchar(80) not null,
+JOB_NAME varchar(80) not null,
+JOB_GROUP varchar(80) not null,
+IS_VOLATILE bit not null,
+DESCRIPTION varchar(120) null,
+NEXT_FIRE_TIME numeric(13,0) null,
+PREV_FIRE_TIME numeric(13,0) null,
+TRIGGER_STATE varchar(16) not null,
+TRIGGER_TYPE varchar(8) not null,
+START_TIME numeric(13,0) not null,
+END_TIME numeric(13,0) null,
+CALENDAR_NAME varchar(80) null,
+MISFIRE_INSTR smallint null
+JOB_DATA image null
+)
+go
+
+/*==============================================================================*/
+/* Create primary key constraints: */
+/*==============================================================================*/
+
+alter table QRTZ_CALENDARS
+add constraint PK_qrtz_calendars primary key clustered (CALENDAR_NAME)
+go
+
+alter table QRTZ_CRON_TRIGGERS
+add constraint PK_qrtz_cron_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
+go
+
+alter table QRTZ_FIRED_TRIGGERS
+add constraint PK_qrtz_fired_triggers primary key clustered (ENTRY_ID)
+go
+
+alter table QRTZ_PAUSED_TRIGGER_GRPS
+add constraint PK_qrtz_paused_trigger_grps primary key clustered (TRIGGER_GROUP)
+go
+
+alter table QRTZ_SCHEDULER_STATE
+add constraint PK_qrtz_scheduler_state primary key clustered (INSTANCE_NAME)
+go
+
+alter table QRTZ_LOCKS
+add constraint PK_qrtz_locks primary key clustered (LOCK_NAME)
+go
+
+alter table QRTZ_JOB_DETAILS
+add constraint PK_qrtz_job_details primary key clustered (JOB_NAME, JOB_GROUP)
+go
+
+alter table QRTZ_JOB_LISTENERS
+add constraint PK_qrtz_job_listeners primary key clustered (JOB_NAME, JOB_GROUP, JOB_LISTENER)
+go
+
+alter table QRTZ_SIMPLE_TRIGGERS
+add constraint PK_qrtz_simple_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
+go
+
+alter table QRTZ_TRIGGER_LISTENERS
+add constraint PK_qrtz_trigger_listeners primary key clustered (TRIGGER_NAME, TRIGGER_GROUP, TRIGGER_LISTENER)
+go
+
+alter table QRTZ_TRIGGERS
+add constraint PK_qrtz_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
+go
+
+alter table QRTZ_BLOB_TRIGGERS
+add constraint PK_qrtz_blob_triggers primary key clustered (TRIGGER_NAME, TRIGGER_GROUP)
+go
+
+
+/*==============================================================================*/
+/* Create foreign key constraints: */
+/*==============================================================================*/
+
+alter table QRTZ_CRON_TRIGGERS
+add constraint FK_cron_triggers_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
+references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
+go
+
+alter table QRTZ_JOB_LISTENERS
+add constraint FK_job_listeners_job_details foreign key (JOB_NAME,JOB_GROUP)
+references QRTZ_JOB_DETAILS (JOB_NAME,JOB_GROUP)
+go
+
+alter table QRTZ_SIMPLE_TRIGGERS
+add constraint FK_simple_triggers_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
+references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
+go
+
+alter table QRTZ_TRIGGER_LISTENERS
+add constraint FK_trigger_listeners_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
+references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
+go
+
+alter table QRTZ_TRIGGERS
+add constraint FK_triggers_job_details foreign key (JOB_NAME,JOB_GROUP)
+references QRTZ_JOB_DETAILS (JOB_NAME,JOB_GROUP)
+go
+
+alter table QRTZ_BLOB_TRIGGERS
+add constraint FK_blob_triggers_triggers foreign key (TRIGGER_NAME,TRIGGER_GROUP)
+references QRTZ_TRIGGERS (TRIGGER_NAME,TRIGGER_GROUP)
+go
+
+/*==============================================================================*/
+/* End of script. */
+/*==============================================================================*/
More information about the jboss-svn-commits
mailing list