Changeset 7650
- Timestamp:
- 05/05/09 13:47:16 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
head/ambra/webapp/src/main/java/org/topazproject/ambra/admin/service/CrossRefPosterService.java
r7600 r7650 28 28 import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity; 29 29 import org.apache.commons.httpclient.methods.multipart.Part; 30 import org.apache.commons.logging.Log; 31 import org.apache.commons.logging.LogFactory; 30 32 31 33 public class CrossRefPosterService { 34 35 private static final Log log = LogFactory.getLog(CrossRefPosterService.class); 36 32 37 private String doiXrefUrl; 33 38 … … 47 52 poster.setRequestEntity(new MultipartRequestEntity(parts, poster.getParams())); 48 53 client.getHttpConnectionManager().getParams().setConnectionTimeout(25000); 49 return client.executeMethod(poster); 54 long time = System.currentTimeMillis(); 55 int responseCode = client.executeMethod(poster); 56 if (log.isInfoEnabled()) 57 log.info("CrossRef call to " + doiXrefUrl + " finished with response "+ responseCode + " in " + 58 (System.currentTimeMillis() - time) + " ms"); 59 return responseCode; 50 60 } 51 61 }
