protected void fireInstructions(final JSONObject data, final Request request, final Response response) throws Exception {
final long key = data.getLong(APPLICATION.VIEW_ID);
final Session session = request.getSession();
final Application applicationSession = (Application) session.getAttribute(Application.class.getCanonicalName());
if (applicationSession == null) { throw new ServerException(ServerException.INVALID_SESSION, "Invalid session, please reload your application (viewID #" + key + ")."); }
final UIContext uiContext = applicationSession.getUIContext(key);
if (uiContext == null) { throw new ServerException(ServerException.INVALID_SESSION, "Invalid session (no UIContext found), please reload your application (viewID #" + key + ")."); }
uiContext.acquire();
UIContext.setCurrent(uiContext);
try {
final Txn txn = Txn.get();