There are a load of places on the internet that give partial solutions to this common problem: XA Transactions, outside an application container. Here’s an attempt to put them all in one place.
A simple example of how to use JSch to copy a file using SFTP, from a system that uses passwords, rather than public keys.
Spring proponents will have you believe that “Unit Testing” of persistent classes is very hard without spring. This is not the case, and can be accomplished in only a few classes.
This is not spring-bashing - I’m sure that Spring is very useful for some. This is simply an alternative approach to one that was presented at InfoQ
Limitation is that the per service type configuration isn’t supported, but this is a start.