You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/06/13 14:14:00 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=14584582#comment-14584582 ]
ASF GitHub Bot commented on ARIES-628:
--------------------------------------
GitHub user maxbruecken opened a pull request:
https://github.com/apache/aries/pull/24
ARIES-628
Unfortunately Transaction annotation doesn't work for me. The AnnotationParser implements a BeanProcessor but it is injected by TxNamespaceHandler as a MutablePassThroughMetadata, which doesn't extend ExtendedBeanMetadata. BlueprintContainerImpl ignores such processors.
I have fixed this problem just like the AuthorizationNsHandler.
Second commit allows to use the JTA 1.2 Transactional annotations.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/maxbruecken/aries ARIES-628
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/aries/pull/24.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #24
----
commit 28616680f15b6c9fc34676e9eb83ca6902a7a3f3
Author: maxbruecken <ma...@gmx.de>
Date: 2015-06-02T19:43:03Z
ARIES-628
commit 0767848c7af4fd0db7f815cecaf418060b5da530
Author: maxbruecken <ma...@gmx.de>
Date: 2015-06-07T11:28:24Z
ARIES-628: enable jta transactional annotation
----
> 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)