[
https://issues.apache.org/jira/browse/ARIES-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057764#comment-13057764
]
Bengt Rodehav commented on ARIES-628:
-------------------------------------
I think this is very important. Specifying transaction attributes in XML using
wildcards is just not programmer friendly enough. I think Aries definitely
needs to support annotation based transaction attributes.
Similar to old XDoclet I think transaction attributes should be allowed both on
the class level and the method level. The attribute on the class level will
then be the default for all methods but will be overridden by the annotation on
the method level.
> Support JTA attributes by annotations
> -------------------------------------
>
> Key: ARIES-628
> URL: https://issues.apache.org/jira/browse/ARIES-628
> Project: Aries
> Issue Type: New Feature
> Components: Transaction
> Reporter: Jean-Baptiste Onofré
>
> currently, we can use a Blueprint descriptor to define the transaction
> attribute associated to methods:
> <bean id="myPojo" class="myPojo" init-method="init">
> <tx:transaction method="set*" value="Required"/>
> <tx:transaction method="get*" value="Supported"/>
> </bean>
> I think it could be interesting for the users to define transaction
> attributes directly in the POJO using annotations.
> For instance, it could be helpful to support the following annotations:
> @PostConstruct
> @PreDestroy
> @Resource
> @TransactionAttribute
> For instance, myPojo will look like:
> public class MyPojo {
> @TransactionAttribute=Required
> public void setData(Data data) {
> ...
> }
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira