Using arbitrary resources with JTA
问题 Is it possible to make any type of custom resource transactioal with JTA? Let's assume a basic example and take a Folder creation that should be rolled back in case of an error. Can such custom resources be handled? 回答1: Yes. That resource needs to provide an implementation of XAResource, and an instance of that implementation needs to be enlisted with the transaction when the resource is used. The resource can get the current transaction from the transaction manager in order to carry out the