Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inaccurate active session count in JavaMonitor



On 15-Jul-09, at 9:21 AM, Chuck Hill wrote:
The memory usage stats are meaningless, but the active session count has been accurate in my experience. I suspect that your code has bugs in it that are preventing session termination. Get a thread dump and see if you have deadlocked threads.

This is my experience as well. The count of currently active sessions is pretty important to management of deployed applications.
Perhaps you've overridden session.terminate() and forgotten to call super.terminate()?
Or perhaps, as Chuck so wisely points out, it's some other problem with your code.


Personally, I would use jdb to intercept what's happening when a session terminates.
Alternatively, you could add code like this to your Session.java:


	public void terminate() {
		// dump a backtrace when the session is terminated
		RuntimeException e = new RuntimeException();
		e.printStackTrace();

// show the before and after count of the active session count from WOApplication
NSLog.debug.appendln("before activeSessionCount = " + WOApplication.application().activeSessionsCount());
super.terminate();
NSLog.debug.appendln("after activeSessionCount = " + WOApplication.application().activeSessionsCount());
}


OTOH, it could be some weirdness with your installation...
Try building and deploying a new project with the terminate code above and launch it with -DWOSessionTimeOut=5
Then connect to the instance, see the home page, then wait and watch to see if the session times out.


Good Luck!
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/email@hidden

This email sent to email@hidden
References: 
 >Inaccurate active session count in JavaMonitor (From: "Cheong Hee (Gmail)" <email@hidden>)
 >Re: Inaccurate active session count in JavaMonitor (From: Chuck Hill <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.