Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 11166 invoked from network); 28 Sep 2009 16:36:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Sep 2009 16:36:00 -0000 Received: (qmail 76314 invoked by uid 500); 28 Sep 2009 16:36:00 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 76268 invoked by uid 500); 28 Sep 2009 16:36:00 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 76258 invoked by uid 99); 28 Sep 2009 16:35:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 16:35:59 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mtylenda@o2.pl designates 193.17.41.11 as permitted sender) Received: from [193.17.41.11] (HELO mailout1.go2.pl) (193.17.41.11) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 16:35:51 +0000 Received: from mailout1.go2.pl (unknown [10.0.0.104]) by mailout1.go2.pl (Postfix) with ESMTP id 0B2B53002D for ; Mon, 28 Sep 2009 18:35:29 +0200 (CEST) Received: from o2.pl (unknown [10.0.0.67]) by mailout1.go2.pl (Postfix) with SMTP for ; Mon, 28 Sep 2009 18:35:28 +0200 (CEST) Subject: =?UTF-8?Q?Re:_@Version?= From: =?UTF-8?Q?Mi=C5=82osz_Tylenda?= To: users@openjpa.apache.org In-Reply-To: <1254153150071-3730214.post@n2.nabble.com> References: <20090928075023.313450@gmx.net> <1254153150071-3730214.post@n2.nabble.com> Mime-Version: 1.0 Message-ID: <3046a1f8.457092a0.4ac0e5cf.e0922@o2.pl> Date: Mon, 28 Sep 2009 18:35:27 +0200 X-Originator: 89.74.167.102 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Good=20morning!/Good=20evening! I=20would=20add=20that=20it=20might=20also=20be=20beneficial=20to=20know=20= whether=20entities=20are=20enhanced=20during=20runtime=20(aka=20subclassi= ng)=20or=20build=20time/by=20javaagent. Regards, Milosz >=20 >=20Good=20morning! >=20 >=20Couple=20questions.=20=20When=20you=20fetch=20the=20entity=20with=20t= he=20getById()=20call,=20are >=20you: >=20=20=20=201)=20Modifying=20any=20of=20its=20persistent=20fields? >=20=20=20=202)=20Establishing=20a=20write-lock?=20(by=20API=20action=20o= r=20configured=20default >=20behavior) >=20 >=20If=20you're=20just=20fetching=20data,=20without=20mutating=20it=20and= =20without=20any >=20write-locks,=20then=20there=20is=20some=20sort=20of=20problem=20which= =20would=20need=20to=20be >=20addressed. >=20 >=20As=20for=20the=20Exception,=20 >=20org.apache.openjpa.persistence.OptimisticLockException,=20being=20thr= own,=20the >=20javadoc=20at >=20http://openjpa.apache.org/builds/1.2.1/apache-openjpa-1.2.1/docs/java= doc/index.html >=20states=20that=20org.apache.openjpa.persistence.OptimisticLockExceptio= n=20extends >=20javax.persistence.OptimisticLockException,=20so=20a=20catch=20block=20= for >=20javax.persistence.OptimisticLockException=20will=20still=20catch=20it= . >=20 >=20 >=20verkehr=20wrote: >=20>=20 >=20>=20I'm=20using=20openejb=203.1.1=20with=20includes=20openjpa.=20I'm=20= annotating=20an=20Integer >=20>=20field=20with=20"@Version".=20 >=20>=20Every=20time=20I'm=20querying=20a=20row=20(e.g.=20calling=20"ejb.= getById()")=20will=20cause=20an >=20>=20update=20of=20the=20row=20with=20a=20new=20version!=20A=20call=20= to=20"ejb.getAll()"=20(which >=20>=20retrieves=20all=20rows=20as=20a=20java.util.List)=20updates=20all= =20rows=20with=20a=20new >=20>=20version=20number!! >=20>=20In=20my=20opinion=20nn=20update=20of=20the=20version=20field=20(c= olumn)=20should=20only=20occur >=20>=20calling=20"persist()".=20-=20Hibernate=20does=20so!=20JPA=20speci= fication=20chapter=203.4. >=20>=20says=20it=20too. >=20>=20 >=20>=20Is=20there=20a=20parameter=20to=20set=20that=20changes=20this=20b= ehaviour. >=20>=20 >=20>=20Further,=20openjpa=20throws=20an >=20>=20org.apache.openjpa.persistence.OptimisticLockException=20and=20no= t >=20>=20javax.persistence.OptimisticLockException >=20>=20Why?=20This=20prohibits=20protability.=20Hibernate=20throws >=20>=20javax.persistence.OptimisticLockException >=20>=20--=20 >=20>=20GRATIS=20f=C3=BCr=20alle=20GMX-Mitglieder:=20Die=20maxdome=20Movi= e-FLAT! >=20>=20Jetzt=20freischalten=20unter=20http://portal.gmx.net/de/go/maxdom= e01 >=20>=20 >=20>=20 >=20 >=20--=20 >=20View=20this=20message=20in=20context:=20http://n2.nabble.com/Version-= tp3728033p3730214.html >=20Sent=20from=20the=20OpenJPA=20Users=20mailing=20list=20archive=20at=20= Nabble.com. >=20