Bug fixes and added redis sentinel supportability changes.
parent
9238d1ee9d
commit
6d58ee6d44
|
@ -3,7 +3,7 @@ package tomcat.request.session.exception;
|
||||||
/** author: Ranjith Manickam @ 3 Dec' 2018 */
|
/** author: Ranjith Manickam @ 3 Dec' 2018 */
|
||||||
public class BackendException extends RuntimeException {
|
public class BackendException extends RuntimeException {
|
||||||
|
|
||||||
private static final String ERROR_MESSAGE = "For some reason, we could process your request. Please contact system administrator for more details.";
|
private static final String ERROR_MESSAGE = "For some reason we couldn't process your request. Please contact system administrator for more details.";
|
||||||
|
|
||||||
public BackendException() {
|
public BackendException() {
|
||||||
super(ERROR_MESSAGE, null, false, false);
|
super(ERROR_MESSAGE, null, false, false);
|
||||||
|
|
|
@ -24,12 +24,12 @@ public class SessionHandlerValve extends ValveBase {
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public void invoke(Request request, Response response) throws IOException, ServletException {
|
public void invoke(Request request, Response response) throws BackendException {
|
||||||
try {
|
try {
|
||||||
getNext().invoke(request, response);
|
getNext().invoke(request, response);
|
||||||
} catch (IOException | ServletException | RuntimeException ex) {
|
} catch (IOException | ServletException | RuntimeException ex) {
|
||||||
LOGGER.error("Error processing request", ex);
|
LOGGER.error("Error processing request", ex);
|
||||||
new BackendException();
|
throw new BackendException();
|
||||||
} finally {
|
} finally {
|
||||||
manager.afterRequest(request);
|
manager.afterRequest(request);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue