emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

Allow applying @Transactional to types and interfaces and add a @NoTransaction attribute #181

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using?

MyBatis-Guice 1.0.0-RC4

Please describe the problem.  Unit tests are best!

@Transactional can just be applied to methods. I would like to apply it also to 
whole types and interfaces. 

Please provide any additional information below.

It is common that all the methods in a service bean are transactional. It would 
be great to be able to define a @Transactional annotation at type level and 
even to be able to define it in a interface, so the classes that implement it 
will become transactional.

This will also require a @NoTransactional annotation to mark exceptions.

This is not needed for GA. It would go better for a later version.

Original issue reported on code.google.com by eduardo.macarron on 24 Nov 2010 at 10:29

GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 24 Nov 2010 at 10:30

GoogleCodeExporter commented 9 years ago
patch for that (the NoTransactional annotation is perhaps useless) 

Original comment by eduardo.macarron on 1 Jan 2011 at 4:33

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 11 Sep 2011 at 4:15

GoogleCodeExporter commented 9 years ago
Sorry I didn't see the change before. This seems to be a reasonable suggestion. 
I'll move it to GitHub to make sure I'll work on it.

Original comment by christia...@ircm.qc.ca on 20 Nov 2013 at 5:45