Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 97856 invoked from network); 14 Apr 2011 17:35:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2011 17:35:45 -0000 Received: (qmail 91110 invoked by uid 500); 14 Apr 2011 17:35:45 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 91078 invoked by uid 500); 14 Apr 2011 17:35:45 -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 91070 invoked by uid 99); 14 Apr 2011 17:35:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2011 17:35:45 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.d.dick@gmail.com designates 209.85.160.174 as permitted sender) Received: from [209.85.160.174] (HELO mail-gy0-f174.google.com) (209.85.160.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2011 17:35:39 +0000 Received: by gyd10 with SMTP id 10so718064gyd.33 for ; Thu, 14 Apr 2011 10:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=vBy+OxNnhBv8W/xKqBIWpSSREA38bKHUUoBnBpvjG04=; b=x+Gu2czGyLeCr4GdJAbbADhc5lmLJVNN4eNYPuyEInL9oG/HnbkJhgxN+HnA9ANK6R aVN3bDq6Gupd00iaGcnmbteyfLENvmV0cu/RDiez8mD8Dn5YEY3xWw4/ckbyHmCu2yBj fLIg98qMjeHe6zU4sv2UKHZCS1OF5DSkRFbh4= 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 :cc:content-type; b=oEMt7eBOXjrgmImiSkbTmAOQwhrAQhY25SgC3hDoet/6tPxlNBQNBkPecKWpwZQaJI R62UjYgdY/ot0TTwdHXsONoK6IkjF6MrgidM1GZdt6jf7YqkROMOJx0rIubLz31dX7RC PzG1431c6vL2OU+M4XL31aO0rXzokbcA6a1mg= Received: by 10.90.149.16 with SMTP id w16mr1826803agd.138.1302802519079; Thu, 14 Apr 2011 10:35:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.192.17 with HTTP; Thu, 14 Apr 2011 10:34:59 -0700 (PDT) In-Reply-To: <1302800775729-6273590.post@n2.nabble.com> References: <1302654019826-6267241.post@n2.nabble.com> <1302706892785-6269353.post@n2.nabble.com> <1302793122555-6273135.post@n2.nabble.com> <1302800775729-6273590.post@n2.nabble.com> From: Michael Dick Date: Thu, 14 Apr 2011 12:34:59 -0500 Message-ID: Subject: Re: @Version for sqlserver "timpstamp" datatype To: users@openjpa.apache.org Cc: chintan4181 Content-Type: multipart/alternative; boundary=0016361e89d45cbb8804a0e45912 --0016361e89d45cbb8804a0e45912 Content-Type: text/plain; charset=ISO-8859-1 Hi Chintan, We're getting a LockTimeoutException from SQLServer, which is why you're seeing a different exception. OpenJPA handles locking on SQLServer a little differently from other databases. Instead of a FOR UPDATE clause we obtain a table lock. It would be most helpful if you could enable logging for SQL and JDBC : In the trace file look for an instance of "WITH (UPDLOCK)" . If that's present, OpenJPA has locked the table (e.g. pessimistic locking). If it isn't found in the trace then it may be a case of implicit locking due to your isolation level. Providing your persistence.xml (pastebin if possible) may be a big help in either case. -mike On Thu, Apr 14, 2011 at 12:06 PM, chintan4181 wrote: > Few more details: Loan object has one-to-one relation with other object and > i > have already queried parent object which contains loan object. > > so Parent p = em.find(Parent.class, pId); > Loan loan = p.getLoan(); > > //setting loan values > > //lock loan object with optimistic lock > //persist it. > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Version-for-sqlserver-timpstamp-datatype-tp6267241p6273590.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > --0016361e89d45cbb8804a0e45912--