given in run.bat file of JBOSS , are the values given to them related . I want to invoke garbage collector on my server heap ; so does that mean i have to just change the value of "-Dsun.rmi.dgc.server.gcInterval"
These setting have to do with applications that participate in remote method invocation (RMI). The "server" setting applies to applications that act as RMI servers (JBossAS qualifies as a server due to JNDI, EJBs deployed, and I think even running the JMS server and web services). The "client" setting applies to app that run as an RMI client - that is, they make calls to an RMI server. This includes any deployed apps that call another server. Example - you have servlets that make calls to EJBs in another JBossAS instance.
The idea behind both settings is that RMI causes both the server and the client to create temporary objects on the heap, and those objects need to be garbage collected. So these timers automatically force a garbage collection at the given interval. The bad news is that they force a major collection, which is usually very costly. Besides, the temp rmi objects these settings are meant to collect are collected anyway during normal minor and major collections. Therefore, the act of running a collection specifically for rmi objects in an app server is ridiculous - the objects that it attempted to clean up are probably already out of the heap.
I recommend making these settings as high as possible. The current setting came from our testing with specjappserver (a j2ee benchmark) which runs for about 40 minutes. The settings force rmi to not run a gc for an hour, which enabled us to avoid having a major collection while running the benchmark. But for production, you want an even higher value. The value is stored in a long, so I would give it Long.MAX_VALUE.
If you are really interested in setting when GC takes place, I recommend making he proper heap settings. And I also recommend reading the performance chapter in JBoss in Action. [ May 21, 2008: Message edited by: Peter Johnson ]