Have your application debugged.
If you get an OOM after a couple hours, then chances are that something is really wrong with it, and you won't fix it by adding more memory. You'll just add more time until it dies. Furthermore, JBoss 4.1 is very old, so I assume nothing really fancy is running on it. Check the logs for connection leaks, heap dumps and stack traces for clues of leaks ant it's origin, run different usage tests on a non-production environment and measure how memory behaves upon each request. You can even use jmap and jdump to generate heap dumps and stack traces before and after a test to compare how the test affected the state of things, or schedule them to run at certain intervals and then check which objects are not being correctly cleaned-up by the GC. Also, turn on GC logging and dumping with these options:
set JAVA_OPTS=%JAVA_OPTS% -XX:OnOutOfMemoryError="%JAVA_HOME%\bin\jmap -dump:format=b,file=%JBOSS_HOME%\bin\heap_%%p.bin" -XX:ErrorFile=%JBOSS_HOME%\bin\hs_err_pid%%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%JBOSS_HOME%\bin -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -Xloggc:%JBOSS_HOME%\bin\gc-%DATE:~-8,-4%%DATE:~-14,-12%%DATE:~-11,-9%.log -XX:-TraceClassUnloading
This will general heap dumps (heap_PID.bin), stack traces (hs_err_pidPID.log) and garbage collection logs (gc_DATE.log) on your JBOSS_HOME\bin folder (you can tune that at will).
The vast majority of the OOM's out there are due to application bugs, so always start looking at the application before throwing hardware to it. The hardware comes after you made sure everything else is right. Even when you get PM's and developers to hate you.
Sebastian