Possibility to mark transaction as rollback only (patch)
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 1.7k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
_From [tomas.varaneckas](https://code.google.com/u/101190767943968272629/) on October 13, 2010 07:27:43_
This applies to "extensions/persist"
The following patch allows to mark transactions as rollback-only. It's useful in unit tests:
`@`Test
`@`Transactional(rollbackOnly = true)
public void testDatabaseStuff() throws Exception {
// do db manipulations
}
No data will be commited to db.
**Attachment:** [gist](https://gist.github.com/70fe3a43cfcff7090a8f)
_[transaction.rollbackonly.diff](https://gist.githubusercontent.com/gissuebot/70fe3a43cfcff7090a8f/raw/f9ad1f7f96513c5496ba9947728c121b35e74567/transaction.rollbackonly.diff)_
_Original issue: http://code.google.com/p/google-guice/issues/detail?id=551_
Contributor guide
Assessment
This issue has not been assessed yet.