- Timestamp:
- 05/23/13 15:34:55 (11 years ago)
- Location:
- trunk/objectmq/src/omq
- Files:
-
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/objectmq/src/omq/client/proxy/Proxymq.java
r18 r19 121 121 // Publish the request 122 122 if (request.isAsync()) { 123 System.out.println("Publish async request ->" + request.getId()); 123 124 publishAsyncRequest(request); 124 125 return null; 125 126 } else { 127 System.out.println("Publish sync request ->" + request.getId()); 126 128 return publishSyncRequest(request, method.getReturnType()); 127 129 } 128 130 } 129 130 private void publishMessage(Request request, String replyQueueName) throws IOException, SerializerException {131 132 private void publishMessage(Request request, String replyQueueName) throws IOException, SerializerException { 131 133 String corrId = request.getId(); 132 134 … … 139 141 140 142 // Publish the message 141 byte[] bytesRequest = Serializer.serialize(request); 143 byte[] bytesRequest = Serializer.serialize(request); 142 144 channel.basicPublish(exchange, routingkey, props, bytesRequest); 143 Log.saveLog("Client-Serialize", bytesRequest); 145 Log.saveLog("Client-Serialize", bytesRequest); 144 146 } 145 147 … … 167 169 } catch (TimeoutException te) { 168 170 System.out.println("Timeout exception catched " + te); 171 te.printStackTrace(); 169 172 } 170 173 i++; 171 174 } 172 175 throw new RetryException(retries, timeout); 173 174 176 } 175 177 -
trunk/objectmq/src/omq/client/remote/response/ResponseListener.java
r9 r19 60 60 // Get the response with its uid 61 61 uid_request = delivery.getProperties().getCorrelationId(); 62 System.out.println("Response reveived -> " + uid_request); 62 63 63 64 // Stores the new response -
trunk/objectmq/src/omq/common/event/EventDispatcher.java
r16 r19 95 95 event = Serializer.deserializeEvent(delivery.getBody()); 96 96 97 System.out.println("Event received -> Topic: " + event.getTopic() + "CorrId: " + event.getCorrId()); 98 97 99 // Dispatch it 98 100 dispatch(event.getTopic(), event); 99 101 } catch (InterruptedException i) { 100 102 System.out.println("InterruptedException e: " + i); 103 i.printStackTrace(); 101 104 } catch (ShutdownSignalException e) { 102 105 System.out.println("ShutdownSignalException e: " + e); 106 e.printStackTrace(); 103 107 } catch (ConsumerCancelledException e) { 104 108 System.out.println("ConsumerCancelledException e: " + e); 109 e.printStackTrace(); 105 110 } catch (Exception e) { 106 111 System.out.println("Exception e: " + e); 112 e.printStackTrace(); 107 113 } 108 114 } -
trunk/objectmq/src/omq/common/util/ParameterQueue.java
r18 r19 47 47 * Time in milis 48 48 */ 49 public static long DEFAULT_TIMEOUT = 5* 1000 * 60;49 public static long DEFAULT_TIMEOUT = 1 * 1000 * 60; 50 50 51 51 } -
trunk/objectmq/src/omq/common/util/Serializer.java
r18 r19 26 26 enableCompression = Boolean.valueOf(env.getProperty(ParameterQueue.ENABLECOMPRESSION, "false")); 27 27 } catch (EnvironmentException e) { 28 e.printStackTrace(); 28 29 } 29 30 … … 40 41 throw new ClassNotFoundException("Class name is null or empty."); 41 42 } 42 43 43 44 serializer = (ISerializer) Class.forName(className).newInstance(); 44 45 } catch (Exception ex) { -
trunk/objectmq/src/omq/server/remote/request/InvocationThread.java
r18 r19 38 38 Log.saveLog("Server-Deserialize", delivery.getBody()); 39 39 40 System.out.println("Invoke method: " + request.getMethod() + " CorrID: " + request.getId()); 41 40 42 // Invoke the method 41 43 Object result = obj.invokeMethod(request.getMethod(), request.getArguments()); … … 48 50 BasicProperties props = delivery.getProperties(); 49 51 50 BasicProperties replyProps = new BasicProperties.Builder().appId(obj.getRef()) 51 .correlationId(props.getCorrelationId()).build(); 52 BasicProperties replyProps = new BasicProperties.Builder().appId(obj.getRef()).correlationId(props.getCorrelationId()).build(); 52 53 53 54 byte[] bytesResponse = Serializer.serialize(resp); … … 58 59 59 60 } catch (InterruptedException i) { 61 i.printStackTrace(); 60 62 killed = true; 61 63 } catch (Exception e) { -
trunk/objectmq/src/omq/ztest/calculator/ClientTest.java
r18 r19 11 11 import org.junit.Test; 12 12 13 public class C alculatorTest {13 public class ClientTest { 14 14 private static Calculator remoteCalc; 15 15 private static Calculator remoteCalc2;
Note: See TracChangeset
for help on using the changeset viewer.