Max memory can be changed with the -Xmx switch. If you look on previous posts like this in the forum the most common response for the actual values is "depends on your application".
Thanks for the reply.
I have no idea by the terms "depends on your application". I have deployed the Enterprise Application using EJBs, JPA and JSF with Prime Faces and DB as PostgreSQL.
Do we have to consider all these things and if we have to, what kind of settings should we make for these kind of applications?
You would need to check the application under load and find bottlenecks. With JConsole you can connect to the application and check approximately how much memory one user session takes up and multiply with best guess for number of concurrent users. Other considerations might be if you have to share the resources with other applications or not, how acceptable GC pauses are etc. Like I said, "depends on your application".