Could someone please respond to me?
Thanks for your help!
Could be prepared statement caching is not working out for you. Perhaps you're not closing them?
What did your profiler saying? It could be your use of the JDBC on the legacy server wasn't correct. Likely an unclosed result set or something.
The pooling is a little bit of overhead, but not significant (more than 1-2ms I'd say)
Thanks genman. We found the issue. The fetch size was not the same in the legacy and JBoss version of the code. It was 20 in our legacy server and is default value 10 in the JBoss version. After changing this, we saw a significant change in performance. But there is still a 40-50ms difference between the new and old server.
This 40-50ms extra time is taken by the rollback opearation. In our JBoss based server, while we return the connection back to the pool, we do the rollback to make sure that those transactions that are not commited by the application is rolled back. I am not sure if we should do this or it is already being done by the JBoss connection pool. Could some one please let me know if we should do the rollback before returning the connection to the pool (of course, we do call the connection.close method after this)?