camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1425655 - in /camel/branches/camel-2.10.x: ./ components/camel-websocket/src/main/java/org/apache/camel/component/websocket/ components/camel-websocket/src/test/java/org/apache/camel/component/websocket/
Date Mon, 24 Dec 2012 14:53:05 GMT
Author: ningjiang
Date: Mon Dec 24 14:53:05 2012
New Revision: 1425655

URL: http://svn.apache.org/viewvc?rev=1425655&view=rev
Log:
CAMEL-5908 fixed the NPE issue of starting the Websocket
Merged revisions 1425653 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1425653 | ningjiang | 2012-12-24 22:30:36 +0800 (Mon, 24 Dec 2012) | 1 line
  
  CAMEL-5908 fixed the NPE issue of starting the Websocket
........

Added:
    camel/branches/camel-2.10.x/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketConsumerRouteTest.java
      - copied unchanged from r1425653, camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketConsumerRouteTest.java
Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
    camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketEndpoint.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1425653

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java?rev=1425655&r1=1425654&r2=1425655&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
(original)
+++ camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
Mon Dec 24 14:53:05 2012
@@ -187,10 +187,6 @@ public class WebsocketComponent extends 
                 enableSessionSupport(connectorRef.server, connectorKey);
             }
 
-            if (prodcon instanceof WebsocketConsumer) {
-                // connect websocket consumer, to servlet
-                connectorRef.servlet.connect((WebsocketConsumer) prodcon);
-            }
         }
 
     }
@@ -426,6 +422,8 @@ public class WebsocketComponent extends 
             if (servlet.getConsumer() == null) {
                 servlet.setConsumer(consumer);
             }
+            // registry the consumer here
+            servlet.connect(consumer);
             return servlet;
         } else {
             throw new Exception("Jetty instance has not been retrieved for : " + key);

Modified: camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketEndpoint.java?rev=1425655&r1=1425654&r2=1425655&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketEndpoint.java
(original)
+++ camel/branches/camel-2.10.x/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketEndpoint.java
Mon Dec 24 14:53:05 2012
@@ -89,6 +89,7 @@ public class WebsocketEndpoint extends D
     public void connect(WebsocketConsumer consumer) throws Exception {
         component.connect(consumer);
         component.addServlet(sync, consumer, remaining);
+        
     }
 
     public void disconnect(WebsocketConsumer consumer) throws Exception {



Mime
View raw message