summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68>2011-05-25 23:09:31 +0000
committerfmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68>2011-05-25 23:09:31 +0000
commit24b50c07ad9a697a285bbd11252f901f74deac9e (patch)
treef6a646cb4bd86e7465626a8253327a6fd8444b19
parent2ce254f0a019c39dfe9b624e76b82c6d2b73873e (diff)
Cleanup binding code by removing debug prints.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1127718 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java3
-rw-r--r--sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java5
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<String> 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);
}