[
https://issues.apache.org/jira/browse/DELTASPIKE-473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13858435#comment-13858435
]
Ivan Vasyliev commented on DELTASPIKE-473:
------------------------------------------
{quote}
My goal is to develop code for CDI, use JTA for transactions and deltaspike for
unit testing
{quote}
So code will be deployable into javaEE7 compliant appserver, and obviously yes,
I want to use javaEE 7 container.
Here is what I already got (with few jumps with deltaspike):
[Code for business logic|
https://github.com/vasilievip/cdi-jpa-jta-generic-dao/blob/master/src/main/java/com/acme/services/ProductService.java]
[Test for business logic|
https://github.com/vasilievip/cdi-jpa-jta-generic-dao/blob/master/src/test/java/com/javafiction/common/persistence/test/ProductServiceTest.java]
I do not want to have any arquillian hacks in unit tests (don't get me wrong,
it great tool, but packaging app in unit tests is something fishy, take a look
at spring instead) and will make sure that app is compliant by actually
deploying it into each container on environment and running acceptance tests
over (e.g. by using jbehave).
> Add support for javax.transaction.Transactional annotation added in JTA 1.2
> spec
> --------------------------------------------------------------------------------
>
> Key: DELTASPIKE-473
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-473
> Project: DeltaSpike
> Issue Type: Improvement
> Components: Data-Module, JPA-Module, TestControl
> Affects Versions: 0.6
> Reporter: Ivan Vasyliev
> Attachments: add_jta_1_2_into_deltaspike.patch
>
>
> https://www.youtube.com/watch?v=rChkWy2NFyQ
> The @Transactional annotation is already part of JavaEE, so there is no need
> to have custom one.
> The idea is to reuse code from JTA implementation. The one which already
> supports 1.2 is Jbosstm(Narayana). I've made an attempt to incorporate it
> into deltaspike. Please see attached changes and testcase.
> Few notes on it:
> - The producers for openwebbeans and weld are different, I've made
> openwebbeans ones
> - There is 2 system preferences which needs to be set to make narayana create
> system folders under proper location (see surefire plugin config)
> - Latest hibernate can autodetect JTA platform
> - EntityManager created outside of JTA transaction can't join it
> automatically, thats why there is proxy which join EM into
> (http://stackoverflow.com/questions/11119182/skipping-jta-sync-registration-due-to-auto-join-checking/11124021#11124021)
> - Code based on this examples:
> https://github.com/jbosstm/quickstart/tree/master/ArjunaJTA/standalone-jta-1_2
> - I did not make attempt to create generic datasource registration function,
> this maybe subject for other issue
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)