It really depends on the JVM and the O/S how much memory they can make available to JBoss. E.g. on 32bit Windoze a practical limit is around 1.5G of java heap, AFAIR. Read the JVM docs.
but can it run beyond 2GB of memory. I have read in some blogs that it extends till 2 GB only
Are you asking about RAM or heap size?
You can break the 2GB (or 1.5GB) heap size barrier only is you run a 64-bit JVM and then you must be running on a 64-bit OS.
If you are asking about RAM, yes you can expand your RAM from 2GB to 4GB; if you have a 32-bit OS you won't be able to see all of though because some of the address space is reserved for hardware use.
I was asking about heap size.
I have SunOS 64 bit and 64-bit JVM can my JBOSS run with heap memory of 4GB??
with your combination it is possible, set -Xmx????M.
A 32Bit Sun-VM at this machine can run with a Heap size below 4GB (-ThreadStack -PermGen, and others).
We run a 32Bit VM with ~3,5GB Heap.
But you should think whether you application really need such amount of memory.
but have u seen ur heap memory reach that level(3.5GB) i mean how much maximum level u'v seen ur heap memory been utilised??
Yes, you might use jstat to check it.
If you set -Xms too high the JVM will not start.
I'm not sure if you start with a small amount of heap and set only -Xmx whther it fails also.