You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2015/02/13 10:35:11 UTC
[jira] [Commented] (ARIES-628) Support JTA attributes by
annotations
[ https://issues.apache.org/jira/browse/ARIES-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14319786#comment-14319786 ]
Christian Schneider commented on ARIES-628:
-------------------------------------------
I agree that supporting annotation for transaction handling makes a lot of sense. As there now is an official annotation @Transactional in jta 1.2 I think we should support this one instead of introducing a new one. See https://javaee-spec.java.net/nonav/javadocs/javax/transaction/Transactional.html
I also think it makes sense to support the other annotations but not in the context of transactions. So I would leave them out of scope here.
Do you still work on this? If not would you mind then that I take this issue?
> 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é
> Assignee: Timothy Ward
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)