Hi Justin, your understanding of the class implementation is correct and there may be a chance that some code may need to be improved, but I am not sure as I could only give a cursory look at the code. By the way, I see that the code in GeronimoTransactionManager calls a "tenant-aware" method in DBCPConnectionFactory and this should provide the correct connection to every thread.
Could you please elaborate more on your concern? If you could share a usage/failure scenario to recreate the issue it would be great too. Thanks, Jacopo On Wed, Jul 20, 2016 at 6:38 AM, Justin Robinson < ofbiz-10.04-downst...@fluidnotions.com> wrote: > I am trying to understand the database connection pooling in ofbiz 14, > which uses dbcp2. > > In the class org.ofbiz.entity.connection.DBCPConnectionFactory there is a > static ConcurrentHashMap which provides a ManagedDataSource for each > tenant. > > But when it comes to obtaining a transaction manager reference, it looks > like there is one global instance for all tenants. > > getTransactionManager in org.ofbiz.geronimo.GeronimoTransactionFactory > returns the static reference to a single GeronimoTransactionManager. > > In multi tenant testing overlapping from different tenants seem like they > interact with eachother. > > Can you explain how the implementation is supposed to work in with multi > tenancy ? >