I am in the process of refactoring an existing JPA/Eclipselink-based application to introduce Eclipselink's partitioning support for database sharding. My current application runs quite well with pooled jdbc connections via boncep.
However, with the sharded model there will be a number of entity types that are Replicated to all shards and, as such, eclipselink will be doing writes that span multiple jdbc connections. Per the eclipselink recommendations for paritioning I would like to introduce JTA in order to enforce integrity across commits that hit multiple partitions. It seems like the ops4j-pax-jdbc bundles are designed to support XA/JTA and it seems like there is a lot of XA support in the various aries bundles (aries.transaction. and aries.jpa.). However, I'm not sure of what combination of these bundles+configuration will provide what I am after. Since many of these bundles seem to be designed/documented around general JTA usage - like performing a transaction that spans JMS and JDBC - I'm not confident if that model works with my particular use case. To further add to this, I would like for my JDBC connections to be pooled for performance. ops4j-pax-jdbc-pool-dbcp2 seems like a logical choice, but again I'm not sure if it will play nicely with the transaction management features from aries. I think I have a working model of this, but I'm rather new to XA/JTA especially from OSGi so I want to make sure I'm getting this correct. So, I guess my questions are: 1. Can ops4j-pax-jdbc-pool and it's dbcp2 sibling work with aries-jpa/transaction to pool and auto-enlist XADataSources? 2. If not, will ops4j-pax-jdbc-pool-aries work? And if so, can its pooling semantics be configured? E.g. minIdle, maxIdle, etc. 3. If neither of the above works, is there a recommended set of bundles to accomplish pooled XADataSources with eclipselink+JTA? Thanks, Matthew Pitts Developer Security Solutions Design & Automation Wells Fargo Bank | Tel 336.608.3332 | Cell 336.202.3913 | Kernersville, NC | MAC D9693-010 [email protected]
