Author: ffang
Date: Mon Jul 23 00:28:03 2012
New Revision: 1364468
URL: http://svn.apache.org/viewvc?rev=1364468&view=rev
Log:
[SMXCOMP-937]when deploying multiple CXF JBI services all services are shown in
the list regardless of port they are running on.
Modified:
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
Modified:
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
URL:
http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java?rev=1364468&r1=1364467&r2=1364468&view=diff
==============================================================================
---
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
(original)
+++
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
Mon Jul 23 00:28:03 2012
@@ -31,6 +31,7 @@ import org.apache.cxf.Bus;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.endpoint.ServerRegistry;
import org.apache.cxf.transport.http_jetty.JettyHTTPDestination;
+import org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine;
import org.eclipse.jetty.http.HttpMethods;
import org.eclipse.jetty.http.MimeTypes;
import org.eclipse.jetty.server.HttpConnection;
@@ -84,9 +85,13 @@ public class ListServiceHandler extends
ServerRegistry serverRegistry =
bus.getExtension(ServerRegistry.class);
servers.addAll(serverRegistry.getServers());
}
+ int serverPort = request.getServerPort();
for (Iterator<Server> iter = servers.iterator(); iter.hasNext();) {
Server server = (Server) iter.next();
JettyHTTPDestination jhd =
(JettyHTTPDestination)server.getDestination();
+ if (((JettyHTTPServerEngine)jhd.getEngine()).getPort() !=
serverPort) {
+ continue;
+ }
String address = jhd.getAddress().getAddress().getValue();
writer.write("<li><a href=\"");
writer.write(address);