myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: [Ext-CDI] @Transactional
Date Sat, 13 Feb 2010 13:32:06 GMT
hi arne,

i used the EntityManager to get an EntityTransaction.
you have to use cdi to create and inject it.
(i used some producer methods.)
i created @PersistenceUnit which is a cdi qualifier and
@Transactional which is a cdi interceptor binding.

basically it works and it isn't hard to use.
however, we have to think about an approach to provide as much as possible
in a generic way.

regards,
gerhard

http://www.irian.at

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

Professional Support for Apache MyFaces


2010/2/13 Arne Limburg <arne.limburg@openknowledge.de>

>  Hi Gerhard,
>
>
>
> Did you mean „i used UserTransaction”? If not, how do you receive your
> EntityTransaction?
>
>
>
> I am working on a solution to get request-scoped EntityManagers injected
> within a servlet-container that does not even support the web-profile (which
> are the current jetty and the current tomcat). I am not able to get an
> EntityManager injected via @PersistenceContext in that environment. So it
> would be nice if there were some CDI-Extension to achieve this. The
> implementation would be pretty straight-forward except the configuration of
> the persistence-unit name and the handling of different persistence-units
> within one CDI-deployment unit.
>
>
>
> Using JTA-Transactions vs. resource-local EntityTransactions is another
> issue here.
>
>
>
> Regards,
>
> Arne
>
>
>
> --
>
>
>
> Arne Limburg - Enterprise Developer
>
> OpenKnowledge GmbH, Oldenburg
>
> Bismarckstraße 13, 26122 Oldenburg
>
> Mobil: +49 (0) 151 - 108 22 942
>
> Tel: +49 (0) 441 - 4082-0
>
> Fax: +49 (0) 441 - 4082-111
>
> arne.limburg@openknowledge.de
>
> http://www.openknowledge.de
>
>
>
> Registergericht: Amtsgericht Oldenburg, HRB 4670
>
> Geschäftsführer: Lars Röwekamp, Jens Schumann
>
>
>
> *Von:* Gerhard Petracek [mailto:gerhard.petracek@gmail.com]
> *Gesendet:* Freitag, 12. Februar 2010 19:59
> *An:* MyFaces Development
> *Betreff:* Re: [Ext-CDI] @Transactional
>
>
>
> hi arne,
>
>
>
> yes - i used EntityTransaction in the prototype and it works pretty well in
> a servlet container (that was the base idea).
>
>
>
> regards,
>
> gerhard
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>  2010/2/12 Arne Limburg <arne.limburg@openknowledge.de>
>
> Hi folks,
>
>
>
> I saw the discussion of adding an @Transactional-Annotation to your CDI
> extensions. I think Gerhard wrote it. I wonder if it deals with JTA
> transactions (which indeed would be pretty straight-forward) or with
> EntityTransactions of an resource-local EntityManager. I am working on the
> latter one and just would want to know if someone else is working on such
> stuff. I think it would be great, when we could archive injection of
> resource-local EntityManagers with transaction-support to deploy it on a
> tomcat or jetty. What do you think?
>
>
>
> Regards,
>
> Arne
>
>
>
> --
>
>
>
> Arne Limburg - Enterprise Developer
>
> OpenKnowledge GmbH, Oldenburg
>
> Bismarckstraße 13, 26122 Oldenburg
>
> Mobil: +49 (0) 151 - 108 22 942
>
> Tel: +49 (0) 441 - 4082-0
>
> Fax: +49 (0) 441 - 4082-111
>
> arne.limburg@openknowledge.de
>
> http://www.openknowledge.de
>
>
>
> Registergericht: Amtsgericht Oldenburg, HRB 4670
>
> Geschäftsführer: Lars Röwekamp, Jens Schumann
>
>
>
>
>

Mime
View raw message