There is no spec that applies in the absence of a j2ee component with a container that understands how to do this association. What is the undefined context in which this is being done?
In the JBoss context manager it is push/popMetaDataAwareContext()
on the CachedConnectionManager.
See the CachedConnectionManagerValve used in our Tomcat integration.
Thank you for your answers!
I'd rather like to stick to API specified in JSRs, though. I'm going to dump that JCA adapter and try to use the JTA API directly instead (even though the spec sounds a bit like the application server would use it to talk to itself only...)
Would you discourage using the JTA directly?