You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Michael Hofmann <mi...@t-online.de> on 2014/09/04 15:32:24 UTC

Transaction-Support not Working when using CDITestRunner

Hello,

I'm using OWB 1.2.6 und deltaspike 1.0.2 and I want to test my 
DAO-classes accessing JPA-classes.
If I'm doing this in my Java SE Environment in a normal fashion: using 
the main(String[] args) method. Everything ist ok. My own Interceptor 
gets called and also the @Transactional-Interceptor. So the insert into 
the database takes place.

After my switch to JUnit 4 and using @RunWith(CdiTestRunner.class) from 
deltaspike, there is neither a call to my interceptor nor a call to the 
transation-interceptor. As a result, the insert into the database is not 
commited.

Can anybody reproduce this behaviour? If not, can you send me a working 
example as a project-zip?

Thanks in advance.
Michael

-- 
Michael Hofmann
Dreitorspitzstrasse 33
D-82467 Garmisch-Partenkirchen
Tel:   +49 (0)8821/9435636
Handy: +49 (0)171/7126525
E-Mail priv.: michael.hofmann.miwa@t-online.de


Re: Transaction-Support not Working when using CDITestRunner

Posted by Gerhard Petracek <ge...@gmail.com>.
hi michael,

please provide a link to a demo-app which illustrates the issue.

regards,
gerhard



2014-09-04 15:32 GMT+02:00 Michael Hofmann <michael.hofmann.miwa@t-online.de
>:

> Hello,
>
> I'm using OWB 1.2.6 und deltaspike 1.0.2 and I want to test my DAO-classes
> accessing JPA-classes.
> If I'm doing this in my Java SE Environment in a normal fashion: using the
> main(String[] args) method. Everything ist ok. My own Interceptor gets
> called and also the @Transactional-Interceptor. So the insert into the
> database takes place.
>
> After my switch to JUnit 4 and using @RunWith(CdiTestRunner.class) from
> deltaspike, there is neither a call to my interceptor nor a call to the
> transation-interceptor. As a result, the insert into the database is not
> commited.
>
> Can anybody reproduce this behaviour? If not, can you send me a working
> example as a project-zip?
>
> Thanks in advance.
> Michael
>
> --
> Michael Hofmann
> Dreitorspitzstrasse 33
> D-82467 Garmisch-Partenkirchen
> Tel:   +49 (0)8821/9435636
> Handy: +49 (0)171/7126525
> E-Mail priv.: michael.hofmann.miwa@t-online.de
>
>