Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 44171 invoked from network); 13 Feb 2010 13:32:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Feb 2010 13:32:58 -0000 Received: (qmail 68917 invoked by uid 500); 13 Feb 2010 13:32:57 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 68845 invoked by uid 500); 13 Feb 2010 13:32:57 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 68837 invoked by uid 99); 13 Feb 2010 13:32:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Feb 2010 13:32:57 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gerhard.petracek@gmail.com designates 209.85.220.226 as permitted sender) Received: from [209.85.220.226] (HELO mail-fx0-f226.google.com) (209.85.220.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Feb 2010 13:32:49 +0000 Received: by fxm26 with SMTP id 26so3392238fxm.13 for ; Sat, 13 Feb 2010 05:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=8MSu3kiQW/NTKkViIGTpuvuI3CN2W7Z4Ogp0ixrgmSc=; b=LJiixuw3WCrm5tDSymeY2Mnv8KAVihyUjvci0P0SBiQmsA8J19nIBrimOWAh8w35y3 ZLx5VuXtahAb0nt7hu4jNnDtgDY56Fwa0hf7khmNpcl1m6pE+ZVfKwUiFktzkJ5dmw9d bRvFe3LMfC/c8nfc+LCOVzNqz4eCF4PO34m2o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=laadqTX4SZzN9Q2PGWMSQiYkbH9uRcUh0FCjp7X0s5d9pKJ8og+O1VmdSJCn4fpF/F ygo3lR5rmR1qZTTEJKm06vi2hHDhQ7oMhAGAFICiTAxmCqUK9gNsXy3lsR3/cr96GenG Zr8+W3jjQZ6n4J8G6OFjGaqRUZIkyVwwJG4jA= MIME-Version: 1.0 Received: by 10.239.193.11 with SMTP id g11mr307477hbi.69.1266067946150; Sat, 13 Feb 2010 05:32:26 -0800 (PST) In-Reply-To: References: <2332f63b1002121059s25a5f7cjd3114239090f5493@mail.gmail.com> From: Gerhard Petracek Date: Sat, 13 Feb 2010 14:32:06 +0100 Message-ID: <2332f63b1002130532h4d423fa2t60b65e8350db6177@mail.gmail.com> Subject: Re: [Ext-CDI] @Transactional To: MyFaces Development Content-Type: multipart/alternative; boundary=001636499063311cd4047f7b6a68 --001636499063311cd4047f7b6a68 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 > Hi Gerhard, > > > > Did you mean =84i used UserTransaction=94? If not, how do you receive you= r > 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 (wh= ich > 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=DFe 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=E4ftsf=FChrer: Lars R=F6wekamp, 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 > > 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 th= e > 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=DFe 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=E4ftsf=FChrer: Lars R=F6wekamp, Jens Schumann > > > > > --001636499063311cd4047f7b6a68 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable hi arne,

i used the=A0EntityManager to get an=A0EntityTr= ansaction.
you have to use cdi to create and inject it.
(i used some producer methods.)
i created=A0@PersistenceUnit whi= ch is a cdi qualifier and
@Transactional which is a cdi interceptor binding.

basically it works and it isn't hard to use.
howev= er, 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 G= erman

Professional Support for Apache MyFaces


2010/2/13 Arne Limburg <arne.limburg@openknow= ledge.de>

Hi Gerhard,

=A0

Did you mean =84i used UserTransaction=94? If not, how do you receive your EntityTransaction?

=A0

I am working on a solution to get request-scoped EntityManagers injected within a servlet-container that does not even support the web-prof= ile (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 w= ould be nice if there were some CDI-Extension to achieve this. The implementatio= n would be pretty straight-forward except the configuration of the persistence-unit name and the handling of different persistence-units withi= n one CDI-deployment unit.

=A0

Using JTA-Transactions vs. resource-local EntityTransactions is another issue here.

=A0

Regards,

Arne

=A0

--

=A0

Arne Limburg - Enterprise Developer

OpenKnowledge GmbH, Oldenburg

Bisma= rckstra=DFe 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.openknowled= ge.de

=A0

Regis= tergericht: Amtsgericht Oldenburg, HRB 4670

Gesch= =E4ftsf=FChrer: Lars R=F6wekamp, Jens Schumann

=A0

Von:<= span style=3D"font-size:10.0pt"> Gerhard Petracek [mailto:ger= hard.petracek@gmail.com]
Gesendet: Freitag, 12. Februar 2010 19:59
An: MyFaces Development
Betreff: Re: [Ext-CDI] @Transactional

=A0

hi arne,

=A0

yes - i used EntityTransaction in the prototype and = it works pretty well in a servlet container (that was the base idea).

=A0

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,

=A0

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?

=A0

Regards,

Arne

=A0

--

=A0

Arne Limburg - Enterprise Devel= oper

OpenKnowledge GmbH, Oldenburg

Bismarckstra=DFe 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

=A0

Registergericht: Amtsgericht Oldenburg, HRB 4670

Gesch=E4ftsf=FChrer: Lars R=F6wekamp, Jens Schumann

=A0

=A0


--001636499063311cd4047f7b6a68--