Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 62693 invoked from network); 12 Oct 2009 04:19:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Oct 2009 04:19:56 -0000 Received: (qmail 9627 invoked by uid 500); 12 Oct 2009 04:19:56 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 9493 invoked by uid 500); 12 Oct 2009 04:19:56 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 9483 invoked by uid 99); 12 Oct 2009 04:19:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2009 04:19:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2009 04:19:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8B40E234C045 for ; Sun, 11 Oct 2009 21:19:31 -0700 (PDT) Message-ID: <1987712031.1255321171555.JavaMail.jira@brutus> Date: Sun, 11 Oct 2009 21:19:31 -0700 (PDT) From: "Albert Lee (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1344) Query [get|set]LockMode not throwing correct exceptions In-Reply-To: <820361559.1255308691346.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee updated OPENJPA-1344: -------------------------------- Description: [get|set]LockMode method in Query interface do not correct exception per spec. - No check on the query type and throw IllegalStateException - Thrown TransactionRequiredExceptin for LockModeType.None. (3.8.8 Queries and Lock Mode....If a lock mode other than NONE is specified for a query, the query must be executed within a transaction or the TransactionRequiredException will be thrown.) /** * Set the lock mode type to be used for the query execution. * @param lockMode * @return the same query instance * @throws IllegalStateException if the query is found not to be * a Java Persistence query language SELECT query * or a Criteria API query */ Query setLockMode(LockModeType lockMode); was: [get|set]LockMode method in Query interface do not correct exception per spec. - No check on the query type and throw IllegalStationException - Thrown TransactionRequiredExceptin for LockModeType.None. (3.8.8 Queries and Lock Mode....If a lock mode other than NONE is specified for a query, the query must be executed within a transaction or the TransactionRequiredException will be thrown.) /** * Set the lock mode type to be used for the query execution. * @param lockMode * @return the same query instance * @throws IllegalStateException if the query is found not to be * a Java Persistence query language SELECT query * or a Criteria API query */ Query setLockMode(LockModeType lockMode); > Query [get|set]LockMode not throwing correct exceptions > ------------------------------------------------------- > > Key: OPENJPA-1344 > URL: https://issues.apache.org/jira/browse/OPENJPA-1344 > Project: OpenJPA > Issue Type: Bug > Components: query > Affects Versions: 2.0.0-M2, 2.0.0-M3 > Reporter: Albert Lee > Assignee: Albert Lee > Priority: Minor > Fix For: 2.0.0-M4 > > > [get|set]LockMode method in Query interface do not correct exception per spec. > - No check on the query type and throw IllegalStateException > - Thrown TransactionRequiredExceptin for LockModeType.None. (3.8.8 Queries and Lock Mode....If a lock mode other than NONE is specified for a query, the query must be executed within a transaction or the TransactionRequiredException will be thrown.) > /** > * Set the lock mode type to be used for the query execution. > * @param lockMode > * @return the same query instance > * @throws IllegalStateException if the query is found not to be > * a Java Persistence query language SELECT query > * or a Criteria API query > */ > Query setLockMode(LockModeType lockMode); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.