Search in sources :

Example 1 with TmlRunnable

use of com.dexels.navajo.script.api.TmlRunnable in project navajo by Dexels.

the class TmlContinuationMultitenantServlet method service.

@Override
protected void service(final HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    try {
        if (useReactiveEndpoint(req)) {
            reactiveHttpServlet.service(req, resp);
            return;
        }
        String instance = determineTenantFromRequest(req);
        LocalClient localClient = getLocalClient();
        if (localClient == null) {
            localClient = getLocalClient(req);
        }
        TmlRunnable runner = TmlRunnableBuilder.prepareRunnable(req, resp, localClient, instance, requestTimeout);
        if (runner != null) {
            getTmlScheduler().submit(runner, false);
        }
    } catch (Throwable e) {
        if (e instanceof ServletException) {
            throw (ServletException) e;
        }
        logger.error("Servlet call failed dramatically", e);
    }
}
Also used : ServletException(javax.servlet.ServletException) LocalClient(com.dexels.navajo.script.api.LocalClient) TmlRunnable(com.dexels.navajo.script.api.TmlRunnable)

Aggregations

LocalClient (com.dexels.navajo.script.api.LocalClient)1 TmlRunnable (com.dexels.navajo.script.api.TmlRunnable)1 ServletException (javax.servlet.ServletException)1