ABSTRACT
Although Java automates the deallocation of memory through garbage collection, a Java program must explicitly free other resources, such as sockets and database connections, to prevent resource leaks. Correct and complete resource deallocation may be complex, requiring nested try-catch-finally blocks. The Framework for Unified Resource Management (Furm) is a Java library designed with the goal of simplifying resource management in single- and multi-threaded programs. Allocated resources are represented by bodes in "resource trees" and resource dependencies are modeled as parent-child relationships. A hierarchy of resources is easily and correctly deallocated by a single call of Furm's release method. Resource trees permit "resource reflection" in which a program monitors its own resource usage. A special WatchDog object detects when a thread dies and takes care of releasing its resources. Furm reduces code complexity while guaranteeing resource cleanup in the face of exceptions and thread termination.
- Alexandrescu, A., and Marginean, P. Simplify Your Exception-Safe Code -- Forever. C/C++ Users Journal, October 2000.http://www.ddj.com/dept/cpp/184403758 (accessed April 2006).Google Scholar
- Apache Tomcat Project. http://tomcat.apache.org/ (accessed April 2006).Google Scholar
- Bloch, J. Effective Java. Addison-Wesley, 2001.Google Scholar
- Campione, M., Walrath, K., and Huml, A. The Java Tutorial. 2005. http://java.sun.com/docs/books/tutorial/networking/index.html (accessed April 2006).Google Scholar
- Chen, R. Cleaner, more elegant, and harder to recognize. Jan. 14, 2005. http://blogs.msdn.com/oldnewthing/archive/2005/01/14/352949.aspx (accessed April 2006).Google Scholar
- Czajkowski, G., Hahn, S., Skinner, G., Soper, P., and Bryce, C. A resource management interface for the Java platform. Software: Practice and Experience, 2005, pp 123--157. Google ScholarDigital Library
- ECMA. Standard ECAM-334: C# Language Specification, 3rd Ed. December 2002. http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf (accessed April 2006).Google Scholar
- Gosling, J., Joy, B., Steele G., and Bracha, G. The Java Language Specification, 3rd Ed. Addison-Wesley, 2005. Google ScholarDigital Library
- Halloway, S. JDC Tech Tips: January 24, 2000. http://java.sun.com/developer/TechTips/2000/tt0124.html (accessed April 2006).Google Scholar
- Java Bug: 4484411, stack overflow error closing a socket input stream. 2001. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4484411 (accessed April 2006).Google Scholar
- Lanin, V. and Shasha, D. Tree Locking on Changing Trees. Technical Report 503, 1990, New York University. Google ScholarDigital Library
- Park, D. A. Simplifying Resource Management in Java. Technical Report 2006-05. Master's Thesis, University of Mississippi, May 2006.Google Scholar
- Spolsky, J. How Microsoft Lost the API War. June 13, 2004. http://www.joelonsoftware.com/articles/APIWar.html (accessed April 2006).Google Scholar
- Spolsky, J. Making Wrong Code Look Wrong. May 11, 2005. http://www.joelonsoftware.com/articles/Wrong.html (accessed April 2006).Google Scholar
- Stroustrup, B. The C++ Programming Language, 3rd Ed. Addison-Wesley, 1997. Google ScholarDigital Library
- Sun Microsystems. Java 2 Platform Standard Edition 5.0 API Specification. 2004. http://java.sun.com/j2se/1.5.0/docs/api/index.html (accessed April 2006).Google Scholar
- Weimer, W. and Necula, G. Finding and Preventing Run-Time Error Handling Mistakes. Proc. of 19th ACM OOPSLA, pp 419--431, Vancouver, British Columbia, Canada, October 2004. Google ScholarDigital Library
Index Terms
- A framework for unified resource management in Java
Recommendations
Extending standard java runtime systems for resource management
SEM'04: Proceedings of the 4th international conference on Software Engineering and MiddlewareResource management is a precondition to build reliable, extensible middleware and to host potentially untrusted user components. Resource accounting allows to charge users for the resource consumption of their deployed components, while resource ...
Transparent resource management with java RM API
ICCS'06: Proceedings of the 6th international conference on Computational Science - Volume Part IVThe Multitasking Virtual Machine has been provided with many useful features like Isolation API or Resource Consumption Management API. The latter one can be used to help in managing resources in Java applications. However, using RM API does not ...
A resource management interface for the Java™ platform
Research ArticlesSoftware systems in many circumstances need awareness of their resource usage. Meeting performance requirements often requires the ability to manage consumption of resources provided by the environment. Resource management is traditionally handled by ...
Comments