well this bug at work is totally getting to me. I have been hammering on it for days and it seems to keep popping back up. it is really demoralizing because I thought I had it, and then I did an update and it f'n came back.
basically I am inventing a new way to do transactions because the original implementation put data in multiple databases. this model requires multiple session factories to be concurrently managed. not an easy task. not to mention I havent ebven started to figure out resource management.
so to make this possible i have to create my own transaction manager that intercepts the datasource id to do a lookup of the appropriate session factory to use.
I am really at wits end. I think I can figure it out, it just is so painful to hammer my head against the wall day after day.