The following modifications are suggested to improve
resource usage. We were running out of file descriptors
in our process and these changes helped our application:
create only one default static final
PropertyConfiguration instance (as a singleton) and
return it when the className is null:
public static final Configuration
In the constructor and save() methods, close the
streams appropriately. Since they weren't explicitly
closed, the file descriptors would stay in use until
the finalizer closed the streams.
Log in to post a comment.