Are you calling getConnection for each of the steps you mentioned below or just one time before executing all these steps. The difference being, when you call getConnection on your datasource it could return a different instance of connection everytime.
In my opinion the possible resolution for this issue would be to call getConnection once and execute all these steps with that reference and closing it after you are done.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com