[jbpm-commits] JBoss JBPM SVN: r2352 - in jbpm4/trunk: modules/api/src/main/java/org/jboss/bpm and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Sep 24 10:25:47 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-09-24 10:25:46 -0400 (Wed, 24 Sep 2008)
New Revision: 2352

Removed:
   jbpm4/trunk/modules/api/src/main/java/org/jboss/bpm/model/
Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
   jbpm4/trunk/pom.xml
Log:
Initial api

Modified: jbpm4/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java	2008-09-24 14:09:42 UTC (rev 2351)
+++ jbpm4/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java	2008-09-24 14:25:46 UTC (rev 2352)
@@ -21,18 +21,6 @@
  */
 package org.jboss.bpm.client;
 
-import java.net.URL;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.BPMException;
-import org.jboss.bpm.client.internal.EmbeddedBeansDeployer;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.util.KernelLocator;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntryNotFoundException;
-
-
 // $Id$
 
 /**
@@ -43,22 +31,6 @@
  */
 public class ProcessEngine
 {
-  // provide logging
-  private static final Log log = LogFactory.getLog(ProcessEngine.class);
-  
-  /** The process engine bean name - jBPMEngine */
-  public static final String BEAN_NAME = "jBPMProcessEngine";
-  /** The default bean config: jbpm-beans.xml */
-  public static final String JBPM_ENGINE_CONFIG = "jbpm-beans.xml";
-
-  // Injected through the MC
-  protected ProcessManager processManager;
-  // Injected through the MC
-  protected ExecutionManager executionManager;
-  // Injected through the MC
-  protected SignalManager signalManager;
-  // Injected through the MC
-  protected MessageManager messageManager;
   // Flag to indicate that the Engine is shutting down
   private boolean prepareForShutdown;
 
@@ -72,50 +44,17 @@
    * 
    * @return The configured instance of a process engine
    */
-  @SuppressWarnings("deprecation")
   public static ProcessEngine locateProcessEngine()
   {
-    KernelRegistryEntry entry = null;
-    Kernel kernel = KernelLocator.getKernel();
-    if (kernel == null)
-    {
-      deployEngineConfiguration();
-      kernel = KernelLocator.getKernel();
-      entry = kernel.getRegistry().getEntry(ProcessEngine.BEAN_NAME);
-    }
-    else
-    {
-      try
-      {
-        entry = kernel.getRegistry().getEntry(ProcessEngine.BEAN_NAME);
-      }
-      catch (KernelRegistryEntryNotFoundException ex)
-      {
-        deployEngineConfiguration();
-        entry = kernel.getRegistry().getEntry(ProcessEngine.BEAN_NAME);
-      }
-    }
-
-    ProcessEngine engine = (ProcessEngine)entry.getTarget();
-    return engine;
+    return null;
   }
 
-  private static void deployEngineConfiguration()
-  {
-    String config = ProcessEngine.JBPM_ENGINE_CONFIG;
-    URL url = Thread.currentThread().getContextClassLoader().getResource(config);
-    if (url == null)
-      throw new BPMException("Cannot find resource: " + config);
-
-    new EmbeddedBeansDeployer().deploy(url);
-  }
-  
   /**
    * Prepare the engine for shutdown. During shutdown the creation of new processes is disallowed.
    */
   public void prepareForShutdown()
   {
-    log.debug("prepareForShutdown");
+    //log.debug("prepareForShutdown");
     prepareForShutdown = true;
   }
 
@@ -132,55 +71,7 @@
    */
   public void cancelShutdown()
   {
-    log.debug("cancelShutdown");
+    //log.debug("cancelShutdown");
     prepareForShutdown = false;
   }
-
-  /**
-   * Get the configured instance of the ProcessManager
-   * 
-   * @return The ProcessManager
-   */
-  public ProcessManager getProcessManager()
-  {
-    if (processManager == null)
-      throw new IllegalStateException("ProcessManager not available through kernel configuration");
-    return processManager;
-  }
-
-  /**
-   * Get the configured instance of the ExecutionManager
-   * 
-   * @return The ExecutionManager
-   */
-  public ExecutionManager getExecutionManager()
-  {
-    if (executionManager == null)
-      throw new IllegalStateException("ExecutionManager not available through kernel configuration");
-    return executionManager;
-  }
-
-  /**
-   * Get the configured instance of the SignalManager
-   * 
-   * @return The SignalManager
-   */
-  public SignalManager getSignalManager()
-  {
-    if (signalManager == null)
-      throw new IllegalStateException("SignalManager not available through kernel configuration");
-    return signalManager;
-  }
-
-  /**
-   * Get the configured instance of the MessageManager
-   * 
-   * @return The MessageManager
-   */
-  public MessageManager getMessageManager()
-  {
-    if (messageManager == null)
-      throw new IllegalStateException("MessageManager not available through kernel configuration");
-    return messageManager;
-  }
 }
\ No newline at end of file

Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml	2008-09-24 14:09:42 UTC (rev 2351)
+++ jbpm4/trunk/pom.xml	2008-09-24 14:25:46 UTC (rev 2352)
@@ -33,6 +33,7 @@
 
   <!-- Modules -->
   <modules>
+    <module>modules/api</module>
     <module>modules/pvm</module>
     <module>modules/jpdl</module>
   </modules>




More information about the jbpm-commits mailing list