I have a web application that contains some JSP pages that return a JSON.
This application has a large stream of access, and I noticed that there are many open sessions in the monitoring area of the GlassFish server.
See a piece of code that is in the JSP:
<%
RequestLive ao vivo = new RequestLive ();
out.print (live.search ());
%>
That's all I have in the JSP, the rest of the Java class does the service, and JSON is printed on the page.
The real question is, is a session open if I access the URL to retrieve the data?
Ex: www.mydomain.com/RequestLive.jsp
Should I call session.invalidade ();
or is it correct as I am using it?