Changeset 49 for trunk/src/main/java/omq/server/InvocationThread.java
- Timestamp:
- 06/19/13 15:59:53 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/server/InvocationThread.java
r47 r49 8 8 import omq.common.util.Serializer; 9 9 import omq.exception.OmqException; 10 11 import org.apache.log4j.Logger; 10 12 11 13 import com.rabbitmq.client.AMQP.BasicProperties; … … 19 21 */ 20 22 public class InvocationThread extends Thread { 23 private static final Logger logger = Logger.getLogger(InvocationThread.class.getName()); 21 24 private RemoteObject obj; 22 25 private BlockingQueue<Delivery> deliveryQueue; … … 44 47 String requestID = request.getId(); 45 48 46 System.out.println("Invoke method: " + methodName + " CorrID: " + requestID);49 logger.debug("Object: " + obj.getRef() + ", method: " + methodName + " corrID: " + requestID); 47 50 48 51 // Invoke the method … … 53 56 } catch (InvocationTargetException e) { 54 57 Throwable throwable = e.getTargetException(); 58 logger.error("Object: " + obj.getRef() + " at method: " + methodName + ", corrID" + requestID, throwable); 55 59 error = new OmqException(throwable.getClass().getCanonicalName(), throwable.getMessage()); 56 60 } catch (NoSuchMethodException e) { 61 logger.error("Object: " + obj.getRef() + " cannot find method: " + methodName); 57 62 error = new OmqException(e.getClass().getCanonicalName(), e.getMessage()); 58 63 } … … 75 80 76 81 } catch (InterruptedException i) { 77 i.printStackTrace();82 logger.error(i); 78 83 killed = true; 79 84 } catch (Exception e) { 80 System.out.println("Error a l'Invocation Thread \nException: " + e); 81 e.printStackTrace(); 85 logger.error("Object: " + obj.getRef(), e); 82 86 } 83 87
Note: See TracChangeset
for help on using the changeset viewer.