[jbpm-commits] JBoss JBPM SVN: r7070 - in jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm: persistence and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Feb 24 06:37:26 EST 2012


Author: marco.rietveld
Date: 2012-02-24 06:37:25 -0500 (Fri, 24 Feb 2012)
New Revision: 7070

Modified:
   jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java
   jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
   jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/PersistenceService.java
Log:
Restoring deleted deprecated methods to assure backwards compatibility. 

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java	2012-02-24 11:35:51 UTC (rev 7069)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java	2012-02-24 11:37:25 UTC (rev 7070)
@@ -415,4 +415,111 @@
   
   private static Log log = LogFactory.getLog(JobExecutor.class);
   
+  /**
+   * ====================
+   * CRUFT! CRUFT! CRUFT!
+   * ====================
+   */
+   
+  /** @deprecated property has no effect */
+  protected int historyMaxSize;
+  /** @deprecated property has no effect */
+  protected int lockBufferTime;
+  /** @deprecated call {@link #getThreads()} instead */
+  protected Map threads;
+  /** @deprecated call {@link #getThreads()} instead */
+  protected LockMonitorThread lockMonitorThread;
+  /** @deprecated this field was just an aid for generating thread names */
+  protected static String hostName;
+
+  /** @deprecated no longer invoked */
+  protected void startThread() {
+    startThread(getNextThreadName());
+  }
+
+  /** @deprecated no longer invoked */
+  protected String getNextThreadName() {
+    return getThreadName(threadGroup.activeCount() + 1);
+  }
+
+  /** @deprecated no longer invoked */
+  protected String getLastThreadName() {
+    Map threads = getThreads();
+    for (int i = nbrOfThreads; i > 0; i--) {
+      String threadName = getThreadName(i);
+      if (threads.containsKey(threadName)) return threadName;
+    }
+    return null;
+  }
+
+  /** @deprecated no longer invoked */
+  protected synchronized Thread stopThread() {
+    Map threads = getThreads();
+    for (int i = nbrOfThreads; i > 0; i--) {
+      String threadName = getThreadName(i);
+      JobExecutorThread executorThread = (JobExecutorThread) threads.get(threadName);
+      if (executorThread != null) {
+        executorThread.deactivate();
+        return executorThread;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * @deprecated call {@link #addMonitoredJobId(String, long)} or
+   * {@link #removeMonitoredJobId(String)} to manipulate the set of monitored jobs
+   */
+  public void setMonitoredJobIds(Map monitoredJobIds) {
+  }
+
+  /** @deprecated property has no effect */
+  public int getHistoryMaxSize() {
+    return historyMaxSize;
+  }
+
+  /** @deprecated property has no effect */
+  public void setHistoryMaxSize(int historyMaxSize) {
+    this.historyMaxSize = historyMaxSize;
+  }
+
+  /**
+   * This method has no effect.
+   * 
+   * @deprecated call {@link #start()} or {@link #stop()} to control this job executor.
+   */
+  public void setStarted(boolean isStarted) {
+  }
+
+  /**
+   * @deprecated replaced by {@link #getNbrOfThreads()}
+   */
+  public int getSize() {
+    return nbrOfThreads;
+  }
+
+  /**
+   * @deprecated replaced by {@link #setNbrOfThreads(int)}
+   */
+  public void setSize(int nbrOfThreads) {
+    this.nbrOfThreads = nbrOfThreads;
+  }
+  
+  /**
+   * This method has no effect.
+   * 
+   * @deprecated this job executor manages its own thread pool
+   */
+  public void setThreads(Map threads) {
+  }
+
+  /** @deprecated property has no effect */
+  public int getLockBufferTime() {
+    return lockBufferTime;
+  }
+
+  /** @deprecated property has no effect */
+  public void setLockBufferTime(int lockBufferTime) {
+    this.lockBufferTime = lockBufferTime;
+  }
 }

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java	2012-02-24 11:35:51 UTC (rev 7069)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java	2012-02-24 11:37:25 UTC (rev 7070)
@@ -7,6 +7,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmConfiguration;
 import org.jbpm.JbpmContext;
 import org.jbpm.db.JobSession;
 import org.jbpm.graph.exe.ProcessInstance;
@@ -176,4 +177,28 @@
   }
 
   private static final Log log = LogFactory.getLog(JobExecutorThread.class);
+  
+  /**
+   * ====================
+   * CRUFT! CRUFT! CRUFT!
+   * ====================
+   */
+  
+  /**
+   * @deprecated use {@link #JobExecutorThread(String, JobExecutor)} instead
+   */
+  public JobExecutorThread(String name, JobExecutor jobExecutor,
+    JbpmConfiguration jbpmConfiguration, int idleInterval, int maxIdleInterval,
+    long maxLockTime, int maxHistory) {
+    super(jobExecutor.getThreadGroup(), name);
+    this.jobExecutor = jobExecutor;
+  }
+ 
+  /**
+   * @deprecated As of jBPM 3.2.3, replaced by {@link #deactivate()}
+   */
+  public void setActive(boolean isActive) {
+    if (isActive == false) deactivate();
+  }
+
 }

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/PersistenceService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/PersistenceService.java	2012-02-24 11:35:51 UTC (rev 7069)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/PersistenceService.java	2012-02-24 11:37:25 UTC (rev 7070)
@@ -39,6 +39,13 @@
   TaskMgmtSession getTaskMgmtSession();
   Object getCustomSession(Class sessionClass);
 
+  /** @deprecated call {@link TxService#isRollbackOnly()} instead */
+  boolean isRollbackOnly();
+  /** @deprecated call {@link TxService#setRollbackOnly()} instead */
+  void setRollbackOnly();
+  /** @deprecated call {@link TxService#setRollbackOnly()} instead */
+  void setRollbackOnly(boolean isRollbackOnly);
+
   void setGraphSession(GraphSession graphSession);
   void setLoggingSession(LoggingSession loggingSession);
   void setJobSession(JobSession jobSession);



More information about the jbpm-commits mailing list