In the jboss server , if out of memory exception ,then configure the following in
jboss/bin/run.conf file,
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms512m -Xmx1024m -XX:PermSize=512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
fi
jboss/bin/run.conf file,
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms512m -Xmx1024m -XX:PermSize=512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
fi