Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |

Our valued sponsors who help make this site possible
FREE Java Performance Troubleshooting Tool from AppDynamics. Download now! 

New Relic: The first free APM tool with production profiler. Download now! 

ManageEngine: End-to-End Java Performance Management. Download Product Now! 

News July 2010

JProfiler
Get rid of your performance problems and memory leaks!

JENNIFER for APM
Monitor All Transactions in "Per-One-Second" Real-time. Download Now!


Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

See Your Message Here
You could have your tool advertised here, to be seen by thousands of potential customers

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:


AppDynamics
FREE Java Performance Troubleshooting Tool from AppDynamics. Download now!

New Relic
New Relic: The first free APM tool with production profiler. Download now!

ManageEngine
ManageEngine: End-to-End Java Performance Management. Download Product Now!


JProfiler
Get rid of your performance problems and memory leaks!

JENNIFER for APM
Monitor All Transactions in "Per-One-Second" Real-time. Download Now!


Back to newsletter 116 contents

One study found that 86% of downtime in production systems was due to resource leaks. That covers memory leaks, obviously, but also files not closed, connection pools that get depleted, runnning out of disk space, locks that aren't released, and so on. Of course there are many more issues that occur in production, but those other issues tend to cause other types of incidents rather than downtime.

Not all resources can be managed by the JVM, but it can certainly try and help out where possible. So Josh Bloch's "Automatic Resource Management" proposal for Java 7 is spot on in trying to target this area. The actual implementation targets objects which define Closeable or AutoCloseable, automatically closing the object when it is finished being used.

When I first heard about this applying to Closeables, I misunderstood it to mean that all classes that implement Closeable will automatically have the close method called on the instance when the object goes out of scope. But that is already easily done by simply adding a finalize method for the class which calls close (and is implemented just that way for many classes, e.g. FileOutputStream). No, this proposal is about having the compiler do what the programmer should do but often forgets - closing resources right after you have finished using them.

A note from this newsletter's sponsor

ManageEngine: Application Performance Management for Java EE Apps.
Monitor App Servers: JBoss, WebSphere, WebLogic, JVMs and JMX Apps.
*** Monitor up to 25 App Servers, Databases & Servers at $795/Yr***.

To achieve this the language is changing very slightly in JDK 7 to add in a new form of the try block where you can define and create a Closeable instance:

try (Something x = new Something()) { ...

(Have a look at the example here).

Usually I'm quite neutral about language changes, but this time I'm really enthusiastic about this one. The improvement in readability is great, but that's just the icing on the cake of excellent proper handling of Closeable resources.

Now on with this month's newsletter. We have all our usual Java performance tools, news, and article links, though still no Javva The Hutt as sadly Glastonbury proved too much for his constitution and he's not yet recovered. Over at fasterj we have a new cartoon showing ClassNotFoundException; and, as usual, we have extracted tips from all of this month's referenced articles.

A note from this newsletter's sponsor

New Relic RPM - The Revolution in Java Performance Management is Here!
Affordable SaaS APM tool to monitor, troubleshoot, and tune apps
running on Websphere, Weblogic, Tomcat, Jetty, JBoss, Solr, Resin

News

Java performance tuning related news.

Tools

Java performance tuning related tools.

A note from this newsletter's sponsor

JProbe is an enterprise-class Java profiler, providing diagnostics
on memory usage, performance and test coverage. Download
a 10-day trial and see why it's the industry leader in Java profiling.

Articles

Jack Shirazi


Back to newsletter 116 contents


Last Updated: 2012-02-02
Copyright © 2000-2012 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries. JavaPerformanceTuning.com is not connected to Sun Microsystems, Inc. and is not sponsored by Sun Microsystems, Inc.
URL: http://www.JavaPerformanceTuning.com/news/news116.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us