From 24b50c07ad9a697a285bbd11252f901f74deac9e Mon Sep 17 00:00:00 2001 From: fmoga Date: Wed, 25 May 2011 23:09:31 +0000 Subject: Cleanup binding code by removing debug prints. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1127718 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java | 3 --- .../sca/binding/comet/runtime/handler/CometBindingHandler.java | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java index 99eb30892e..ef8d1179a0 100644 --- a/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java @@ -48,14 +48,11 @@ public class CometInvoker implements Invoker { Broadcaster broadcaster = CometComponentContext.broadcasters.get(sessionId); Message response = new MessageImpl(); if (broadcaster == null) { - System.out.println("Broadcaster already removed."); response.setBody(Status.CLIENT_DISCONNECTED); } else if (broadcaster.getAtmosphereResources().isEmpty()) { - System.out.println("Removing broadcaster " + sessionId + "..."); CometComponentContext.broadcasters.remove(sessionId); response.setBody(Status.CLIENT_DISCONNECTED); } else { - System.out.println("Using broadcaster " + sessionId + "..."); String callbackMethod = msg.getTo().getURI(); Object[] body = msg.getBody(); broadcaster.broadcast(callbackMethod + "($.secureEvalJSON('" + CometComponentContext.gson.toJson(body[0]) diff --git a/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java index 3a9dcac049..693e72c4ae 100644 --- a/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java +++ b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java @@ -97,7 +97,7 @@ public class CometBindingHandler { @GET @Path("/connect") public SuspendResponse connect() { - System.out.println("-- connect -- Session Id: " + request.getSession().getId()); +// System.out.println("-- connect -- Session Id: " + request.getSession().getId()); if (broadcaster == null) { broadcaster = new JerseyBroadcaster(); // broadcaster.setBroadcasterLifeCyclePolicy(new Builder().policy(ATMOSPHERE_RESOURCE_POLICY.IDLE_DESTROY) @@ -130,14 +130,13 @@ public class CometBindingHandler { public void handleRequest(@PathParam("service") final String service, @PathParam("method") final String method, @FormParam("callbackMethod") final String callbackMethod, @FormParam("params") final String jsonData) throws InvocationTargetException { - System.out.println("-- handleRequest -- Session Id: " + request.getSession().getId()); +// System.out.println("-- handleRequest -- Session Id: " + request.getSession().getId()); final String url = "/" + service + "/" + method; final RuntimeEndpoint wire = context.getEndpoint(url); final Operation operation = context.getOperation(url); final Object[] args = decodeJsonDataForOperation(jsonData, operation); Message msg = createMessageWithMockedCometReference(args, callbackMethod); - System.out.println("CometBindingHandler thread id: " + Thread.currentThread().getId()); wire.invoke(operation, msg); } -- cgit v1.2.3