These are somethings that may work for you:
a) Try giving different names (instead of $dbConnection) for database connection objects to db1 and db2. Drop the $dbConnection as and when you are done mapping it to these new connection objects.
b) It looks like you should have an EXIT from FLOW and signal FAILURE in the error block in serviceB
c) Why dont you have the rollback-db1 immediately after the rollback-db2? Looks like you dont need to seperate these two rollbacks?
d) The database connection objects may not be there in the pipeline sometimes (after you do pub.flow:getLastError)when errors happen. You may have to retrieve it from the lastErrorInfo.pipeline.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB