Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void process(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- final RackApplicationFactory rackFactory = context.getRackFactory();
- RackApplication app = null;
- try {
- app = rackFactory.getApplication();
- RackEnvironment env = new ServletRackEnvironment(request);
- RackResponse rack_resp = app.call(env);
- Object obj = env.getAttribute("async");
- if (obj == null) {
- rack_resp.respond(new ServletRackResponseEnvironment(response));
- } else {
- //JavaEmbedUtils.rubyToJava(app, );
- // mark the request asynchronous and properly clean up.
- if (request.isAsyncSupported() == true){
- AsyncContext ctx = request.startAsync();
- }
- }
- } catch (Exception re) {
- handleException(re, rackFactory, request, response);
- } finally {
- if (app != null) {
- rackFactory.finishedWithApplication(app);
- }
- }
- }
Add Comment
Please, Sign In to add comment