DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 09:44 ---
(In reply to comment #3)
 Look Remy, I'm not trying to fight with you but what I'm saying is this...
 
 resourceEntries is only referenced by WebappClassLoader.java (I scanned the
 entire source-code tree) and within that file, entries are added but never
 removed. It does not respect the configuration settings outlined here:
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
 
 Specifically, cacheMaxSize, cacheTTL.

These attributes are not for controlling the classloader behavior.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 18:11 ---
Ok, then humbly request that you allow me to file this RFE. Is there any good
reason to not allow the classloader to deallocate idle resource cache entries?
If a large JAR entry was accessed accessed a few hours ago, why should it remain
cached in memory?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 18:30 ---
Classloaders are nearly all of the time meant to load applications and their
needed resources. As a result, all the said resources will have the same
lifecycle. You are trying to use the Tomcat classloader to do something else.
For that kind of usage, you should use a custom classloader implementation, or
(better) use a loading mechanism which actually suit your needs.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 18:37 ---
Yes, but how many ClassLoaders keep a cache around forever with no maximum size
or idle detection? At the very least you should be using SoftReferences here,
which have been around since JDK 1.2 and have been specifically designated for
caches. Webapps are rarely short-lived which makes this problem even worse.

I would be perfectly fine with SoftReferences with no configuration settings.
Can you make this modification?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 18:45 ---
How come classloaders hold class definitions forever until they are destroyed ?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 18:57 ---
Remy, I really don't understand what your objection is all about. What is lost
by modifying the code to use SoftReferences?

Classes can be kept around forever with a minimal memory impact. Caching the
underlying resources on the other hand is a totally different matter as they are
*much* bigger. I don't think anything is lost by using SoftReferences.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 22:49 ---
(In reply to comment #9)
 Remy, I really don't understand what your objection is all about. What is lost
 by modifying the code to use SoftReferences?

Do you really understand SoftReferences? Quite a lot of the time, a
SoftReference will be GC'ed as soon as the JVM has to do its first full GC.  For
most of our applications, we've found that SoftReferences are GC'ed on an
average within minutes or even seconds of losing their last hard reference.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-22 23:01 ---
Shankar,

From the Javadoc:

Virtual machine implementations are, however, encouraged to bias against
clearing recently-created or recently-used soft references.

and

Thus a sophisticated cache can, for example, prevent its most recently used
entries from being discarded by keeping strong referents to those entries,
leaving the remaining entries to be discarded at the discretion of the garbage
collector.

Memory has to come from somewhere. There is absolutely nothing wrong with
resource cache entries being removed by GC if it just so happens that these
references are used less often than others in the pool.

I understand your concerns, but I think we can all agree on the following
use-case: if a large image resource has not been accessed in over 12 hours, it
makes perfect sense to allow it to be garbage collected.

If you really want to guarantee that resources will remain cached for a minimum
of X minutes, simply maintain a hard reference to them and after X minutes
remove the hard reference leaving only SoftReferences in place. I've used this
many times in my own code and it works beautifully.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2005-08-21 22:12 ---
How about filing sensible bug reports rather than continuously waste people's
time with non existent corner cases ? Obviously there are one million ways to
write broken webapps.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-21 22:22 ---
Remm, this isn't a problem with my webapp. This is a problem with Tomcat.

WebappClassLoader disregards the context cache settings. That is the problem. I
can't even configure its behavior.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36293] - Ability to free idle ClassLoader resources

2005-08-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36293





--- Additional Comments From [EMAIL PROTECTED]  2005-08-21 22:28 ---
Look Remy, I'm not trying to fight with you but what I'm saying is this...

resourceEntries is only referenced by WebappClassLoader.java (I scanned the
entire source-code tree) and within that file, entries are added but never
removed. It does not respect the configuration settings outlined here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

Specifically, cacheMaxSize, cacheTTL.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]