After some investigation, I found out that transactional session was the culprit. When I disabled transaction, the speed seemed to be similar to using file persistent manager (with transaction). This is a bummer because in my case using transaction will be very useful, almost essential.
Has anyone been successful in maintaining high speed with using transaction in jdbc2? If so could you share your wisdom?
I also found that using rolled log persistence manager is slow as well when the number of messages are large (1000+ simulataneous message with transaction). Is there a way to tune the persistence manager?
I haven't used the JDBC2 PM myself. The file-based PM will be too slow on filesystems such as Solaris's.
The rolling-logged PM will be slow unless you set "RollOverSize" (an MBean attribute) to something around 400-500 messages. This attribute may only be in 3.2RC2 and later. Also, setting the PM's write directory to a fast disk may help.