You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/08/12 07:33:38 UTC

DO NOT REPLY [Bug 45617] New: Resource is not closed

https://issues.apache.org/bugzilla/show_bug.cgi?id=45617

           Summary: Resource is not closed
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: ackel@sohu.com


In class DefaultServlet[1], I found a possible bug as follows.
DefaultServlet declares a field ProxyDirContext (resource), this class and its
subclass WebdavServlet[2] uses this resource but no methods closes the
resource.
For example, in line 671, there is a usage, resources.createSubcontext(path).
In some methods, there should be a corresponding call
resources.destroySubcontext() to release the resource, but I cannot find any
methods release the resource. Is that a bug?

[1]http://www.google.com/codesearch?hl=en&q=show:7z5z6cIEBgo:5UT4Xi66j3s:TJ-HG-YhCvU&sa=N&ct=rd&cs_p=ftp://apache.mirrors.pair.com/tomcat/tomcat-6/v6.0.10/src/apache-tomcat-6.0.10-src.zip&cs_f=apache-tomcat-6.0.10-src/java/org/apache/catalina/servlets/DefaultServlet.java&start=1 

[2]http://www.google.com/codesearch?hl=en&q=lang:java+createSubcontext+javax.naming.directory.DirContext+show:Qa22ZYrrAgE:5UT4Xi66j3s:A9SD-e-MXrM&sa=N&ct=rx&cd=8&cs_p=ftp://apache.mirrors.pair.com/tomcat/tomcat-6/v6.0.10/src/apache-tomcat-6.0.10-src.zip&cs_f=apache-tomcat-6.0.10-src/java/org/apache/catalina/servlets/WebdavServlet.java&cs_p=ftp://apache.mirrors.pair.com/tomcat/tomcat-6/v6.0.10/src/apache-tomcat-6.0.10-src.zip&cs_f=apache-tomcat-6.0.10-src/java/org/apache/catalina/servlets/WebdavServlet.java


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

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


DO NOT REPLY [Bug 45617] Resource is not closed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45617


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #1 from Mark Thomas <ma...@apache.org>  2008-08-12 06:45:43 PST ---
If you aren't sure if you have found a bug, creating a bugzilla entry is not
the place to start. The place to start is usually the users list along with
your test case / profiler report etc.

The example you provide createSubcontext() and destroySubcontext() is not a
valid one. If you trace the code through to FileDirContext you will see why.


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

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