Tuning the Application Server is most important to see 'real' performance improvement.
For tuning GlassFish see, Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide.
For the details of thread pooling in GlassFish, see the chapter on Thread Pooling in Sun GlassFish Enterprise Server 2.1 Administration Guide.
For tuning MySQL database connections, you can refer MySQL Documentation.