ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r789446 - in /ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel: CorrelatorDaoImpl.java MessageExchangeDaoImpl.java
Date Mon, 29 Jun 2009 21:01:55 GMT
Author: mriou
Date: Mon Jun 29 21:01:55 2009
New Revision: 789446

URL: http://svn.apache.org/viewvc?rev=789446&view=rev
Log:
Queries for mex cleanup are very deadlock prone, commenting out until they get improved. Use
of an Hibernate iterator is opening a cursor needlessly for routing.

Modified:
    ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/CorrelatorDaoImpl.java
    ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java

Modified: ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/CorrelatorDaoImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/CorrelatorDaoImpl.java?rev=789446&r1=789445&r2=789446&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/CorrelatorDaoImpl.java
(original)
+++ ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/CorrelatorDaoImpl.java
Mon Jun 29 21:01:55 2009
@@ -118,26 +118,22 @@
         q.setLockMode("hs", LockMode.UPGRADE);
 
         HCorrelatorSelector selector;
-        Iterator selectors = null;
-        try {
-            List<HProcessInstance> targets = new ArrayList<HProcessInstance>();
-            selectors = q.iterate();
-            while (selectors.hasNext()) {
-                selector = (HCorrelatorSelector) selectors.next();
-                if (selector != null) {
-                    if ("all".equals(selector.getRoute()) ||
-                            ("one".equals(selector.getRoute()) && !targets.contains(selector.getInstance())))
{
-                        routes.add(new MessageRouteDaoImpl(_sm, selector));
-                        targets.add(selector.getInstance());
-                    }
+        List selectors;
+        List<HProcessInstance> targets = new ArrayList<HProcessInstance>();
+        selectors = q.list();
+        for (Object selo : selectors) {
+            selector = (HCorrelatorSelector) selo;
+            if (selector != null) {
+                if ("all".equals(selector.getRoute()) ||
+                        ("one".equals(selector.getRoute()) && !targets.contains(selector.getInstance())))
{
+                    routes.add(new MessageRouteDaoImpl(_sm, selector));
+                    targets.add(selector.getInstance());
                 }
             }
-        } finally {
-            if (selectors != null) Hibernate.close(selectors);
         }
 
         if(__log.isDebugEnabled()) __log.debug(hdr + "found " + routes);
-        
+
         return routes;
     }
 

Modified: ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java?rev=789446&r1=789445&r2=789446&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java
(original)
+++ ode/branches/APACHE_ODE_1.X/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java
Mon Jun 29 21:01:55 2009
@@ -352,9 +352,10 @@
 	}
 	
 	public void release(boolean doClean) {
-		if( doClean ) {
-			deleteMessages();
-		}
+// TODO the cleanup queries as they are right now thend to be very deadlocky
+// 		if( doClean ) {
+// 			deleteMessages();
+// 		}
 	}
 
 	public void releasePremieMessages() {
@@ -373,4 +374,4 @@
 		getSession().delete(_hself);
 		// This deletes endpoint LData, callbackEndpoint LData, request HMessage, response HMessage,
HMessageExchangeProperty 
 	}
-}
\ No newline at end of file
+}



Mime
View raw message