tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vernon Wu" <vwu98...@lycos.com>
Subject RE: Weird Problems
Date Tue, 10 Feb 2004 16:10:07 GMT
Thanks Yoav for your response. 

>>The first problem is the session counter. It is implemented with the
>>HttpSessionListener. It works fine until recently. Under the TC5.0.X,
>the
>>counter can be a negative figure.
>
>The problem is obviously in your session counter code: if you posted it,
>we could help more.
>

I wish I can say the same. It, however, doesn' explain why the problem only occurs recently.
I note it on TC 5.0.x with the same code (I believe). Here is the code segment:

public final class MyListener
	implements
		ServletContextListener,
		HttpSessionListener,
		HttpSessionActivationListener {


	private static int activeSessionCount = 0;

	public void contextInitialized(ServletContextEvent evt) {

// ...
	}

	public void contextDestroyed(ServletContextEvent evt) {

// ...
	}

	public void sessionCreated(HttpSessionEvent evt) {

		activeSessionCount++;
		HttpSession session = evt.getSession();
// ...
		logger.info(
			"The session ID: "
				+ session.getId()
				+ ", the total # of active sessions: "
				+ activeSessionCount);
	}

	public void sessionDestroyed(HttpSessionEvent evt) {

		activeSessionCount--;
		logger.debug("The number of active sessions: " + activeSessionCount);
	}

	public void sessionWillPassivate(HttpSessionEvent evt) {
// ...
	}

	public void sessionDidActivate(HttpSessionEvent evt) {
		logger.info("sessionDidActivate");
	}

	public static int getActiveSessionCount() {
		return activeSessionCount;
	}
}

>>The second is a quite severe problem. I configure the welcome file to
>map a
>>JSP file. Sometimes, an incoming URL of the default domain leads to the
>404
>>error. After I click the reload button on my browser, the JSP file
>shows
>>up.
>
>You need to do better than "sometimes" in order to get precise help.
>When does it happen, when does it not happen, and what's in the logs in
>both cases?

If I could pin point the occasion, I might solve it by now. I don't observe any logs from
the container during the time when the error occurs, but I would like to know how set up logging
messages for the problem. I don't know whether it is related with the container configuration.
The tag pool is disable. 

Also, some users report the 404 error on some other use scenario, but we haven't observe the
same. The error rate is above 7-8% of the total hits. If a user follows the action options
on a screen, the error shall never happen. 

Vernon


____________________________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message