How to manage transaction for database and file system in jee environment?
- by Michael Lu
I store file’s attributes (size, update time…) in database. So the problem is how to manage transaction for database and file.
In jee environment, JTA is just able to manage database transaction.
In case, updating database is successful but file operation fails, should I write file-rollback method for this? Moreover, file operation in EJB container violates EJB spec.
What’s your opinion? Thank!