This is as far as I got if anyone needs it, now re-assessing global transactions:
and it works.
I then setup an aop implementation that gets the needed oldurl from the datasource and newurl from a stepExecutionListener. The idea being that I get the first index of the stepExecutionListener array object in the aop proxy - close (if needed) and initialize with new url and the jdbcTemplate is none the wiser...
I then run the Spring Batch job and get the following:
[The 'createCompositeTransaction' and 'Coordinator not recoverable' are two lines I don't see on my
test run.]
I have dug around in the Atomikos code and confirmed that Atomikos is removing the named resource on close.
I have tried setting lazy-init="false" with no change.
I have tried altering the properties file url on close thinking the init will re-read the properties file on init - no change.
Kinda want this
Switching Datasources dynamically at runtime (I understand boneCP is not XA Transaction compliant)
Cheers