I recently performed a check in one of our applications and what I found
out was that many libraries we were using were not really prepared to
be in a context that is restarted.
They usually leak resources because they are developed thiking that they
will be used in a JVM where a restart of
I tried JSF1.2 in Resin 3.1.0 and 3.1.1 but none work!
Please help me!
My enviroment:
1.JDK1.5
2.Resin 3.0.23 or 3.1.0 or 3.1.1
3.jsf-1_2_01
4.code:select.war(I deploy it successfully in Glassfish,just drop it in
domain1/autodeploy)
This is my war file
public class MyServlet extends HttpServlet {
private int nonThreadSafeInt = 1;
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
nonThreadSafeInt++;
try {
Thread.currentThread().sleep((long) Math.random() * 5000);
John Steel wrote:
I understand nonThreadSafeInt isn't thread safe. This means it must be
shared across all instances. So whats the difference between that and
declaring it as
public static int nonThreadSafeInt = 1;
apart from then being able to do MyServlet.nonThreadSafeInt++; which I