How to manage transaction for database and file system in jee environment?

Posted by Michael Lu on Stack Overflow See other posts from Stack Overflow or by Michael Lu
Published on 2010-03-11T04:48:49Z Indexed on 2010/03/11 4:55 UTC
Read the original article Hit count: 247

Filed under:
|
|
|

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!

© Stack Overflow or respective owner

Related posts about jee

Related posts about transaction