You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Deven Phillips <de...@gmail.com> on 2015/03/10 18:07:41 UTC

@Transactional with DeltaSpike/JPA/Hibernate

So, I followed the instructions on
https://deltaspike.apache.org/documentation/jpa.html

I even added the interceptor to the beans.xml file. I tried setting
@Transactional(Transactional.TxType.REQUIRED). Regardless, I get:

ERROR ToDoDAO Error getting ToDo list
javax.persistence.TransactionRequiredException: no transaction is in
progress

Could any hypothesize as to what I might be missing?

DeltaSpike 1.2.1, Weld 2.2.9.Final, Hibernate JPA 2.1...

Thanks in advance!!

Deven

Re: @Transactional with DeltaSpike/JPA/Hibernate

Posted by Deven Phillips <de...@gmail.com>.
Woot! Thanks Gerard! That was the problem. I had used
javax.transaction.Transactional instead.. The DeltaSpike implementation
worked!

Cheers,

Deven

On Tue, Mar 10, 2015 at 1:18 PM, Gerhard Petracek <
gerhard.petracek@gmail.com> wrote:

> hi deven,
>
> if you follow [1], please use
> @org.apache.deltaspike.jpa.api.transaction.Transactional
>
> regards,
> gerhard
>
> [1] https://deltaspike.apache.org/documentation/jpa.html
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
> 2015-03-10 18:17 GMT+01:00 l.penet@senat.fr <l....@senat.fr>:
>
> > On 10/03/2015 18:07, Deven Phillips wrote:
> >
> >> So, I followed the instructions on
> >> https://deltaspike.apache.org/documentation/jpa.html
> >>
> >> I even added the interceptor to the beans.xml file. I tried setting
> >> @Transactional(Transactional.TxType.REQUIRED). Regardless, I get:
> >>
> >> ERROR ToDoDAO Error getting ToDo list
> >> javax.persistence.TransactionRequiredException: no transaction is in
> >> progress
> >>
> > Well, I can tell you it works as I use it with several EntityManager(s)
> > (and that is very handy) ;-).
> >
> > I guess a sample case will help us help you.
> >
> > Ludovic
> > |
> > | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> > |
> >
> >
>

Re: @Transactional with DeltaSpike/JPA/Hibernate

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

if you follow [1], please use
@org.apache.deltaspike.jpa.api.transaction.Transactional

regards,
gerhard

[1] https://deltaspike.apache.org/documentation/jpa.html

http://www.irian.at

Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans

2015-03-10 18:17 GMT+01:00 l.penet@senat.fr <l....@senat.fr>:

> On 10/03/2015 18:07, Deven Phillips wrote:
>
>> So, I followed the instructions on
>> https://deltaspike.apache.org/documentation/jpa.html
>>
>> I even added the interceptor to the beans.xml file. I tried setting
>> @Transactional(Transactional.TxType.REQUIRED). Regardless, I get:
>>
>> ERROR ToDoDAO Error getting ToDo list
>> javax.persistence.TransactionRequiredException: no transaction is in
>> progress
>>
> Well, I can tell you it works as I use it with several EntityManager(s)
> (and that is very handy) ;-).
>
> I guess a sample case will help us help you.
>
> Ludovic
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>
>

Re: @Transactional with DeltaSpike/JPA/Hibernate

Posted by "l.penet@senat.fr" <l....@senat.fr>.
On 10/03/2015 18:07, Deven Phillips wrote:
> So, I followed the instructions on
> https://deltaspike.apache.org/documentation/jpa.html
>
> I even added the interceptor to the beans.xml file. I tried setting
> @Transactional(Transactional.TxType.REQUIRED). Regardless, I get:
>
> ERROR ToDoDAO Error getting ToDo list
> javax.persistence.TransactionRequiredException: no transaction is in
> progress
Well, I can tell you it works as I use it with several EntityManager(s) 
(and that is very handy) ;-).

I guess a sample case will help us help you.

Ludovic
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|