Hello,
If you wish to combine more than one resources inside a single transaction, you will have to use XA/JTA transactions. Though databases support both normal and XA transactions, but since filesystems do not support transactions (none of normal and XA transactions), you can rely on
XADisk which exposes APIs for file/directory operations to enable transactions (both normal and XA) over filesystems.
Hope that helps.
Thanks,
Nitin