You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ms...@apache.org on 2007/09/04 15:44:46 UTC

svn commit: r572681 - in /ode/branches/bart: Rakefile bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java

Author: mszefler
Date: Tue Sep  4 06:44:46 2007
New Revision: 572681

URL: http://svn.apache.org/viewvc?rev=572681&view=rev
Log:
Fixed rakefile.
Merged stragglers in bpel-store.

Modified:
    ode/branches/bart/Rakefile
    ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java
    ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java

Modified: ode/branches/bart/Rakefile
URL: http://svn.apache.org/viewvc/ode/branches/bart/Rakefile?rev=572681&r1=572680&r2=572681&view=diff
==============================================================================
--- ode/branches/bart/Rakefile (original)
+++ ode/branches/bart/Rakefile Tue Sep  4 06:44:46 2007
@@ -236,7 +236,7 @@
     compile.from apt
     compile.with projects("bpel-api", "bpel-compiler", "bpel-dao", "bpel-obj", "bpel-schemas",
       "bpel-store", "jacob", "jacob-ap", "utils"),
-      COMMONS.logging, COMMONS.collections, JAXEN, JAVAX.persistence, JAVAX.stream, SAXON, WSDL4J, XMLBEANS
+      COMMONS.logging, COMMONS.collections, JAXEN, JAVAX.persistence, JAVAX.stream, SAXON, WSDL4J, XMLBEANS, JAVAX.transaction
 
     test.with projects("scheduler-simple", "dao-jpa", "dao-hibernate", "bpel-epr"),
         BACKPORT, COMMONS.pool, COMMONS.lang, DERBY, JAVAX.connector, JAVAX.transaction,
@@ -283,7 +283,7 @@
   define "bpel-test" do
     compile.with projects("bpel-api", "bpel-compiler", "bpel-dao", "bpel-runtime",
       "bpel-store", "utils", "bpel-epr", "dao-jpa"),
-      DERBY, Java::JUnit::JUNIT_REQUIRES, JAVAX.persistence, OPENJPA, WSDL4J
+      DERBY, Java::JUnit::JUNIT_REQUIRES, JAVAX.persistence, OPENJPA, WSDL4J, JAVAX.transaction
 
     test.with projects("bpel-obj", "jacob", "bpel-schemas",
       "bpel-scripts", "scheduler-simple"),

Modified: ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java
URL: http://svn.apache.org/viewvc/ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java?rev=572681&r1=572680&r2=572681&view=diff
==============================================================================
--- ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java (original)
+++ ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/DeploymentUnitDir.java Tue Sep  4 06:44:46 2007
@@ -156,6 +156,7 @@
             bpelc.setProcessWSDL(bpel11wsdl.toURI());
         
         bpelc.setCompileProperties(prepareCompileProperties(bpelFile));
+        bpelc.setBaseDirectory(_duDirectory);
         try {
             bpelc.compile(bpelFile);
         } catch (IOException e) {
@@ -225,7 +226,7 @@
 
             WSDLFactory4BPEL wsdlFactory = (WSDLFactory4BPEL) WSDLFactoryBPEL20.newInstance();
             WSDLReader r = wsdlFactory.newWSDLReader();
-            DefaultResourceFinder rf = new DefaultResourceFinder(_duDirectory);
+            DefaultResourceFinder rf = new DefaultResourceFinder(_duDirectory, _duDirectory);
             URI basedir = _duDirectory.toURI();
             ArrayList<File> wsdls = listFilesRecursively(_duDirectory, DeploymentUnitDir._wsdlFilter);
             for (File file : wsdls) {

Modified: ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java?rev=572681&r1=572680&r2=572681&view=diff
==============================================================================
--- ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java (original)
+++ ode/branches/bart/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java Tue Sep  4 06:44:46 2007
@@ -277,14 +277,21 @@
         });
 
         // We want the events to be fired outside of the bounds of the writelock.
-        for (ProcessConfImpl process : processes) {
-            fireEvent(new ProcessStoreEvent(ProcessStoreEvent.Type.DEPLOYED, process.getProcessId(), process.getDeploymentUnit()
-                    .getName()));
-            fireStateChange(process.getProcessId(), process.getState(), process.getDeploymentUnit().getName());
+        try {
+            for (ProcessConfImpl process : processes) {
+                fireEvent(new ProcessStoreEvent(ProcessStoreEvent.Type.DEPLOYED, process.getProcessId(), process.getDeploymentUnit()
+                        .getName()));
+                fireStateChange(process.getProcessId(), process.getState(), process.getDeploymentUnit().getName());
+            }
+        } catch (Exception e) {
+            // A problem at that point means that engine deployment failed, we don't want the store to keep the du
+            __log.warn("Deployment failed within the engine, store undeploying process.");
+            undeploy(deploymentUnitDirectory);
+            if (e instanceof ContextException) throw (ContextException) e;
+            else throw new ContextException("Deployment failed within the engine.", e);
         }
 
         return deployed;
-
     }
 
     public Collection<QName> undeploy(final File dir) {