tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fm...@apache.org
Subject svn commit: r1127718 - in /tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime: CometInvoker.java handler/CometBindingHandler.java
Date Wed, 25 May 2011 23:09:32 GMT
Author: fmoga
Date: Wed May 25 23:09:31 2011
New Revision: 1127718

URL: http://svn.apache.org/viewvc?rev=1127718&view=rev
Log:
Cleanup binding code by removing debug prints.

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java
    tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java?rev=1127718&r1=1127717&r2=1127718&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java
Wed May 25 23:09:31 2011
@@ -48,14 +48,11 @@ public class CometInvoker implements Inv
 		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])

Modified: tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java?rev=1127718&r1=1127717&r2=1127718&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/handler/CometBindingHandler.java
Wed May 25 23:09:31 2011
@@ -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);
 	}
 



Mime
View raw message