[ http://jira.codehaus.org/browse/GEOT-907?page=all ]
Martin Desruisseaux reopened GEOT-907:
--------------------------------------
Porting the fix to the 2.2 branch as well.
> Caching in BufferedAuthorityFactory does not work
> -------------------------------------------------
>
> Key: GEOT-907
> URL: http://jira.codehaus.org/browse/GEOT-907
> Project: GeoTools
> Issue Type: Bug
> Components: core referencing
> Affects Versions: 2.2-RC2
> Environment: Windows XP SP2, JDK 1.5.0_06, JBoss 4.0.4-GA
> Reporter: Felix LJ Mayer
> Assigned To: Martin Desruisseaux
> Fix For: 2.3.M0, 2.2.1
>
>
> The problem is one line the this method in
> org.geotools.referencing.factory.BufferedAuthorityFactory:
> private void put(final Object key, final Object object) {
> pool.put(key, object);
> // TODO fixed this line
> int toReplace = maxStrongReferences - pool.size(); // here is the
> problem
> if (toReplace > 0) {
> ...
> }
> }
> This line should be
> int toReplace = pool.size() - maxStrongReferences;
> With the current code, if maxStrongReferences = 100 and pool.size() = 20, up
> to 80 entries in the pool will be overwritten with WeakReferences, resulting
> in nearly no caching.
> And while you're at it, could you please give
> org.geotools.referencing.factory.epsg.DefaultFactory
> a constructor that lets me set the buffer size in the
> BufferedAuthorityFactory?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel