Changeset 49 for trunk/src/main/java/omq/client
- Timestamp:
- 06/19/13 15:59:53 (11 years ago)
- Location:
- trunk/src/main/java/omq/client
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/client/listener/ResponseListener.java
r44 r49 6 6 import java.util.Map; 7 7 import java.util.Properties; 8 9 import org.apache.log4j.Logger; 8 10 9 11 import omq.client.proxy.Proxymq; … … 26 28 */ 27 29 public class ResponseListener extends Thread { 30 private static final Logger logger = Logger.getLogger(ResponseListener.class.getName()); 28 31 private static ResponseListener rListener; 29 32 … … 78 81 } 79 82 } catch (InterruptedException i) { 80 i.printStackTrace();83 logger.error(i.toString(), i); 81 84 } catch (ShutdownSignalException e) { 82 e.printStackTrace();85 logger.error(e.toString(), e); 83 86 try { 84 87 if (channel.isOpen()) { … … 92 95 Thread.sleep(milis); 93 96 } catch (InterruptedException e2) { 94 e2.printStackTrace();97 logger.error(e2.toString(), e2); 95 98 } 96 99 } 97 100 } catch (ConsumerCancelledException e) { 98 e.printStackTrace();101 logger.error(e.toString(), e); 99 102 } catch (Exception e) { 100 e.printStackTrace();103 logger.error(e.toString(), e); 101 104 } 102 105 } … … 201 204 */ 202 205 public void kill() throws IOException { 206 logger.warn("Killing ResponseListener"); 203 207 interrupt(); 204 208 killed = true; -
trunk/src/main/java/omq/client/proxy/Proxymq.java
r47 r49 10 10 import java.util.Map; 11 11 import java.util.Properties; 12 13 import org.apache.log4j.Logger; 12 14 13 15 import omq.Remote; … … 44 46 */ 45 47 private static final long serialVersionUID = 1L; 48 private static final Logger logger = Logger.getLogger(Proxymq.class.getName()); 46 49 private static Map<String, Object> proxies = new Hashtable<String, Object>(); 47 50 … … 132 135 // Publish the request 133 136 if (request.isAsync()) { 134 System.out.println("Publish async request -> " + request.getId());137 logger.debug("Publish async request -> " + request.getId()); 135 138 publishAsyncRequest(request); 136 139 } else { 137 System.out.println("Publish sync request -> " + request.getId());140 logger.debug("Publish sync request -> " + request.getId()); 138 141 response = publishSyncRequest(request, method.getReturnType()); 139 142 … … 186 189 return getResult(corrId, timeout, type); 187 190 } catch (TimeoutException te) { 188 System.out.println("Timeout exception catched " + te); 189 te.printStackTrace(); 191 logger.error(te); 190 192 } 191 193 i++; … … 292 294 public static Object newProxyInstance(ClassLoader loader, Class<?>[] interfaces, Proxymq proxy) { 293 295 if (proxies.containsKey(proxy.getRef())) { 294 System.out.println("Proxy trobat");295 296 return proxies.get(proxy.getRef()); 296 297 }
Note: See TracChangeset
for help on using the changeset viewer.