/** * Destroys the session and unmanages its ontologies (which are also lost unless stored). * * @param sessionId * the session identifier * @param uriInfo * @param headers * @return {@link Status#OK} if the deletion was successful, {@link Status#NOT_FOUND} if there is no such * session at all. */ @DELETE public Response deleteSession(@PathParam("id") String sessionId, // @Context UriInfo uriInfo, @Context HttpHeaders headers) { session = sesMgr.getSession(sessionId); if (session == null) return Response.status(NOT_FOUND).build(); sesMgr.destroySession(sessionId); session = null; ResponseBuilder rb = Response.ok(); // addCORSOrigin(servletContext, rb, headers); return rb.build(); }
sessionManager.destroySession(session.getID());