Performance and scalability: 24x7 Availability Of J2EE Apps
I am working in an Italian Banking Company's software division placed in India. The bank software runs on EJB... I was surprised to find from my superiors that our production servers are restarted once in every day...
- Posted by: Subhash Chandran
- Posted on: November 30 2003 01:48 EST
My seniors said that it is mandatory for restarting a J2EE App Server once in a while to help Garbage Collecting .
Is it really necessary to restart our app servers once in a while??
Not at all, if thats the case the there is something wrong with yr application.
Do sepcify what appliaction server u are using and what O/S, if it is on windows as O/S, then this can be a possiblity. :-).
(Co-Author of this Tutorial)
If the application or the application server leaks memory, then it may be necessary, or maybe if you use a really old version of the JDK (like 1.2 or earlier).
We have applications that we only restart when we do major software upgrades, move the servers or lose power for long periods of time (e.g. not restarted for months on end).
Coherence: Clustered JCache for Grid Computing!
Static collections are a major source of leak in any applications. Get rid of static HashMaps and other collections that you might have to cache some heavy-weight objects and make them instance members.
Close resource handles when you don't need the resource instead of anticipating future use. You can always reallocate when required.
Use the -server option if possible. It is tuned to perform better in server environments.
Invoke the gc() method at reasonable intervals.
I also work for a bank that runs its pure J2EE CoreBanking application on Websphere(Oracle+AIX) with more than 2 million trx per day but we never need such a funny reason to restart the app. servers.In fact they are sometimes started after months for some fix paks etc..
We event don't restart for business code deployment.(Dynamic classloading)