servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r1411053 - in /servicemix/components/trunk/engines/servicemix-drools: ./ src/main/java/org/apache/servicemix/drools/model/ src/test/resources/
Date Mon, 19 Nov 2012 03:38:51 GMT
Author: janstey
Date: Mon Nov 19 03:38:49 2012
New Revision: 1411053

URL: http://svn.apache.org/viewvc?rev=1411053&view=rev
Log:
SM-2165 - servicemix-drools doesn't work with JDK7

Modified:
    servicemix/components/trunk/engines/servicemix-drools/pom.xml
    servicemix/components/trunk/engines/servicemix-drools/src/main/java/org/apache/servicemix/drools/model/Exchange.java
    servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-StringValue.drl
    servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-XPathAttr.drl
    servicemix/components/trunk/engines/servicemix-drools/src/test/resources/chained.drl
    servicemix/components/trunk/engines/servicemix-drools/src/test/resources/fibonacci.drl
    servicemix/components/trunk/engines/servicemix-drools/src/test/resources/router.drl

Modified: servicemix/components/trunk/engines/servicemix-drools/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-drools/pom.xml?rev=1411053&r1=1411052&r2=1411053&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-drools/pom.xml (original)
+++ servicemix/components/trunk/engines/servicemix-drools/pom.xml Mon Nov 19 03:38:49 2012
@@ -43,7 +43,7 @@
     </repositories>
 
     <properties>
-        <drools.version>5.1.1</drools.version>
+        <drools.version>5.5.0.Final</drools.version>
 
         <servicemix.osgi.import>
             !org.apache.servicemix.drools*,

Modified: servicemix/components/trunk/engines/servicemix-drools/src/main/java/org/apache/servicemix/drools/model/Exchange.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-drools/src/main/java/org/apache/servicemix/drools/model/Exchange.java?rev=1411053&r1=1411052&r2=1411053&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-drools/src/main/java/org/apache/servicemix/drools/model/Exchange.java
(original)
+++ servicemix/components/trunk/engines/servicemix-drools/src/main/java/org/apache/servicemix/drools/model/Exchange.java
Mon Nov 19 03:38:49 2012
@@ -40,25 +40,25 @@ public class Exchange {
     public static final String OUT_MESSAGE = "out";
     
     private final MessageExchange exchange;
-    private Message in;
-    private Message out;
-    private Message fault;
+    private Message inMsg;
+    private Message outMsg;
+    private Message faultMsg;
     private NamespaceContext namespaceContext;
     
     public Exchange(MessageExchange exchange, NamespaceContext namespaceContext) {
         this.exchange = exchange;
         this.namespaceContext = namespaceContext;
-        if (in == null) {
+        if (inMsg == null) {
             NormalizedMessage msg = exchange.getMessage("in");
-            in = msg != null ? new Message(msg, this.namespaceContext) : null;
+            inMsg = msg != null ? new Message(msg, this.namespaceContext) : null;
         }
-        if (out == null) {
+        if (outMsg == null) {
             NormalizedMessage msg = exchange.getMessage("out");
-            out = msg != null ? new Message(msg, this.namespaceContext) : null;
+            outMsg = msg != null ? new Message(msg, this.namespaceContext) : null;
         }
-        if (fault == null) {
+        if (faultMsg == null) {
             javax.jbi.messaging.Fault msg = exchange.getFault();
-            fault = msg != null ? new Fault(msg, this.namespaceContext) : null;
+            faultMsg = msg != null ? new Fault(msg, this.namespaceContext) : null;
         }
     }
     
@@ -104,16 +104,16 @@ public class Exchange {
         exchange.setProperty(name, value);
     }
     
-    public Message getIn() {
-        return in;
+    public Message getInMsg() {
+        return inMsg;
     }
     
-    public Message getOut() {
-        return out;
+    public Message getOutMsg() {
+        return outMsg;
     }
     
-    public Message getFault() {
-        return fault;
+    public Message getFaultMsg() {
+        return faultMsg;
     }
     
     protected Message getMessage(String name) {

Modified: servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-StringValue.drl
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-StringValue.drl?rev=1411053&r1=1411052&r2=1411053&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-StringValue.drl
(original)
+++ servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-StringValue.drl
Mon Nov 19 03:38:49 2012
@@ -22,7 +22,7 @@ global org.apache.servicemix.drools.mode
  
 rule "Set XPath Attribute /test/@id to 0"
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
+		me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null )
 	then
-		$in.setXPath("/test/@id", "0");
-end
\ No newline at end of file
+		$inMsg.setXPath("/test/@id", "0");
+end

Modified: servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-XPathAttr.drl
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-XPathAttr.drl?rev=1411053&r1=1411052&r2=1411053&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-XPathAttr.drl
(original)
+++ servicemix/components/trunk/engines/servicemix-drools/src/test/resources/XPathAttrMod-XPathAttr.drl
Mon Nov 19 03:38:49 2012
@@ -22,7 +22,7 @@ global org.apache.servicemix.drools.mode
  
 rule "Set /test/child/@id to /test/@id"
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
+		me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null )
 	then
-		$in.setXPath("/test/child/@parentId", $in.getXPath("/test/@id"));
+		$inMsg.setXPath("/test/child/@parentId", $inMsg.getXPath("/test/@id"));
 end

Modified: servicemix/components/trunk/engines/servicemix-drools/src/test/resources/chained.drl
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-drools/src/test/resources/chained.drl?rev=1411053&r1=1411052&r2=1411053&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-drools/src/test/resources/chained.drl (original)
+++ servicemix/components/trunk/engines/servicemix-drools/src/test/resources/chained.drl Mon
Nov 19 03:38:49 2012
@@ -8,7 +8,7 @@ rule UnknownOperation
     agenda-group "init"
     auto-focus true    
     when
-        $me : Exchange( status == Exchange.ACTIVE, $in : in != null,
+        $me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null,
                        operation != "{smx}process")
     then
         jbi.route("service:smx/target");
@@ -18,7 +18,7 @@ rule Input
     agenda-group "input"
     auto-focus true    
     when
-        $me : Exchange( status == Exchange.ACTIVE, $in : in != null,
+        $me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null,
                        operation == "{smx}process" )
         eval ( true )
     then

Modified: servicemix/components/trunk/engines/servicemix-drools/src/test/resources/fibonacci.drl
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-drools/src/test/resources/fibonacci.drl?rev=1411053&r1=1411052&r2=1411053&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-drools/src/test/resources/fibonacci.drl
(original)
+++ servicemix/components/trunk/engines/servicemix-drools/src/test/resources/fibonacci.drl
Mon Nov 19 03:38:49 2012
@@ -28,7 +28,7 @@ rule Init
 		$me : Exchange()
 		not Fibonacci()
 	then
-		String t = $me.getIn().getContent().getTextContent();
+		String t = $me.getInMsg().getContent().getTextContent();
 		int v = Integer.parseInt( t );
 		jbi.getLogger().debug("request value: " + v);
 		if (v > max) {

Modified: servicemix/components/trunk/engines/servicemix-drools/src/test/resources/router.drl
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-drools/src/test/resources/router.drl?rev=1411053&r1=1411052&r2=1411053&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-drools/src/test/resources/router.drl (original)
+++ servicemix/components/trunk/engines/servicemix-drools/src/test/resources/router.drl Mon
Nov 19 03:38:49 2012
@@ -3,12 +3,12 @@
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * (the "License"); you may not use this file except inMsg compliance with
+ * the License.  You may obtainMsg a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
+ * Unless required by applicable law or agreed to inMsg writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
@@ -22,32 +22,32 @@ global org.apache.servicemix.drools.mode
  
 rule "Unspecified id"
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
-		eval( $in.xpath("/test/@id <= 0") )
+		me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null )
+		eval( $inMsg.xpath("/test/@id <= 0") )
 	then
 		jbi.fault( "<fault>Id must be > 0</fault>" );
 end
 
 rule "Route to target1"
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
-		eval( $in.xpath("/test/@id = 1") )
+		me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null )
+		eval( $inMsg.xpath("/test/@id = 1") )
 	then
 		jbi.route( "service::target1" );
 end
 
 rule "Route to target2"
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
-		eval( $in.xpath("/test/@id = 2") )
+		me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null )
+		eval( $inMsg.xpath("/test/@id = 2") )
 	then
 		jbi.route( "service::target2" );
 end
 
 rule "Route to target3"
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
-		eval( $in.getProperty("prop") != null )
+		me : Exchange( status == Exchange.ACTIVE, $inMsg : inMsg != null )
+		eval( $inMsg.getProperty("prop") != null )
 	then
 		jbi.route( "service::target3" );
 end



Mime
View raw message