views:

65

answers:

2

Hi All,

I am relatively new to working on huge applications in Java. I am working on a Java web service which is pretty heavily used by various clients. The service basically queries the database (hibernate) and then works with a lot of Lists (there are adapters to convert list returned from DB to the interface which the service publishes) and I am seeing lot of issues with the service like high CPU usage or high heap space.

While I can troubleshoot the performance issues using a profiler, I want to actually learn about what all I need to take care when I actually write code. Like what kind of List to use or things like using StringBuilder instead of String, etc... Is there any book or blogs which I can refer which will help me while I write new services?

Also my application is multithreaded - each service call from a client is a new thread, and I want to know some best practices around that area as well.

I did search the web but I found many tips which are not relevant in the latest Java 6 releases, so wanted to know what kind of resources would help a developer starting out now on Java for heavily used applications.

Arvind

+1  A: 

Performance issues is one of the many issues addressed in B. Goetz, Java Concurrency in Practice (ISBN 978-0321349606), which is essential reading for anyone doing multithreaded programming in Java.

Will
Is there a recent edition of this, I see only 2006 edition in Amazon, is it still relevant in Java 6?
Arvind
+1  A: 

As you use hibernate, have a look at caching there. Some usefull links on this topic are:

Arne Burmeister