Well, it turned out that the maximum limit of 100 prepared statements per connection was a driver bug which they have now fixed.
Nevertheless i tried using the Enable Prepared Statement Cache property but it did gave me the same problem. Even though bitronix was caching the statements, the driver would throw the same error regardless.
Thanks for your help!
Btw... BTM is awesome!
Ludovic Orban wrote:
I see two ways around that problem:
1) split your work between two transactions
2) enable prepared statements cache
The first option is obvious but not very practical. The second one might help but with no guarantee. If most of your prepared statements are for the same query the BTM connection pool can reuse them instead of recreating them. Just call setPreparedStatementCacheSize(size) on the PoolingDataSource instance before initialization to enable it. You will certainly need to tweak the cache size tough.