skip to main content
10.1145/1168054.1168070acmotherconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
Article

A framework for unified resource management in Java

Published: 30 August 2006 Publication History

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.

References

[1]
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).
[2]
Apache Tomcat Project. http://tomcat.apache.org/ (accessed April 2006).
[3]
Bloch, J. Effective Java. Addison-Wesley, 2001.
[4]
Campione, M., Walrath, K., and Huml, A. The Java Tutorial. 2005. http://java.sun.com/docs/books/tutorial/networking/index.html (accessed April 2006).
[5]
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).
[6]
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.
[7]
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).
[8]
Gosling, J., Joy, B., Steele G., and Bracha, G. The Java Language Specification, 3rd Ed. Addison-Wesley, 2005.
[9]
Halloway, S. JDC Tech Tips: January 24, 2000. http://java.sun.com/developer/TechTips/2000/tt0124.html (accessed April 2006).
[10]
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).
[11]
Lanin, V. and Shasha, D. Tree Locking on Changing Trees. Technical Report 503, 1990, New York University.
[12]
Park, D. A. Simplifying Resource Management in Java. Technical Report 2006-05. Master's Thesis, University of Mississippi, May 2006.
[13]
Spolsky, J. How Microsoft Lost the API War. June 13, 2004. http://www.joelonsoftware.com/articles/APIWar.html (accessed April 2006).
[14]
Spolsky, J. Making Wrong Code Look Wrong. May 11, 2005. http://www.joelonsoftware.com/articles/Wrong.html (accessed April 2006).
[15]
Stroustrup, B. The C++ Programming Language, 3rd Ed. Addison-Wesley, 1997.
[16]
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).
[17]
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.

Cited By

View all
  • (2015)Automated resource release in device driversProceedings of the 2015 IEEE 26th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE.2015.7381811(172-182)Online publication date: 2-Nov-2015
  • (2013)Resco: Automatic Collection of Leaked ResourcesIEICE Transactions on Information and Systems10.1587/transinf.E96.D.28E96.D:1(28-39)Online publication date: 2013
  • (2008)Mobile JikesRVMScience of Computer Programming10.1016/j.scico.2007.07.00970:2-3(221-240)Online publication date: 1-Feb-2008

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
PPPJ '06: Proceedings of the 4th international symposium on Principles and practice of programming in Java
August 2006
230 pages
ISBN:3939352055
DOI:10.1145/1168054
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 30 August 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. exception handling
  2. resource monitoring and deallocation

Qualifiers

  • Article

Acceptance Rates

Overall Acceptance Rate 29 of 58 submissions, 50%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 19 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2015)Automated resource release in device driversProceedings of the 2015 IEEE 26th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE.2015.7381811(172-182)Online publication date: 2-Nov-2015
  • (2013)Resco: Automatic Collection of Leaked ResourcesIEICE Transactions on Information and Systems10.1587/transinf.E96.D.28E96.D:1(28-39)Online publication date: 2013
  • (2008)Mobile JikesRVMScience of Computer Programming10.1016/j.scico.2007.07.00970:2-3(221-240)Online publication date: 1-Feb-2008

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media