@Override public void failure(final Throwable error) { try { if (!response.isCommitted()) { response.setCode(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); response.setDescription(error.getMessage()); } } finally { logger.debugLog("failure(...) called"); commit(); rethrow(error); } }
/** * This can be used to determine whether the <code>Response</code> * has been committed. This is true if the <code>Response</code> * was committed, either due to an explicit invocation of the * <code>commit</code> method or due to the writing of content. If * the <code>Response</code> has committed the <code>reset</code> * method will not work in resetting content already written. * * @return true if the response has been fully committed */ public boolean isCommitted() { return response.isCommitted(); }
/** * This can be used to determine whether the <code>Response</code> * has been committed. This is true if the <code>Response</code> * was committed, either due to an explicit invocation of the * <code>commit</code> method or due to the writing of content. If * the <code>Response</code> has committed the <code>reset</code> * method will not work in resetting content already written. * * @return true if the response has been fully committed */ public boolean isCommitted() { return response.isCommitted(); }
/** * This can be used to determine whether the <code>Response</code> * has been committed. This is true if the <code>Response</code> * was committed, either due to an explicit invocation of the * <code>commit</code> method or due to the writing of content. If * the <code>Response</code> has committed the <code>reset</code> * method will not work in resetting content already written. * * @return true if the response has been fully committed */ public boolean isCommitted() { return response.isCommitted(); }
@Override public void failure(final Throwable error) { try { if (!response.isCommitted()) { response.setCode(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); response.setDescription(error.getMessage()); } } finally { logger.debugLog("failure(...) called"); commit(); rethrow(error); } }