You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (JIRA)" <ji...@apache.org> on 2009/10/12 02:51:31 UTC

[jira] Created: (OPENJPA-1344) Query [get|set]LockMode not throwing correct exceptions

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 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);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1344) Query [get|set]LockMode & Em getLockMode not throwing correct exceptions

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee updated OPENJPA-1344:
--------------------------------

    Component/s:     (was: query)
                 jpa
    Description: 
[get|set]LockMode method in Query interface do not throw correct exception per spec.

- No check on the query type and throw IllegalStateException
- Thrown TransactionRequiredException 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);

-----------------------------

getLockMode method in EntityManager interface do not throw correct exception per spec.

- No check in active transaction and throw TransactionRequiredException
- No check if entity is attached and throw IllegalArgumentException

/**
* Get the current lock mode for the entity instance.
* @param entity
* @return lock mode
* @throws TransactionRequiredException if there is no
* transaction
* @throws IllegalArgumentException if the instance is not a
* managed entity and a transaction is active
*/
public LockModeType getLockMode(Object entity);

  was:
[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);

        Summary: Query [get|set]LockMode & Em getLockMode not throwing correct exceptions  (was: Query [get|set]LockMode not throwing correct exceptions)

> Query [get|set]LockMode & Em getLockMode not throwing correct exceptions
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-1344
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1344
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    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 throw correct exception per spec.
> - No check on the query type and throw IllegalStateException
> - Thrown TransactionRequiredException 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);
> -----------------------------
> getLockMode method in EntityManager interface do not throw correct exception per spec.
> - No check in active transaction and throw TransactionRequiredException
> - No check if entity is attached and throw IllegalArgumentException
> /**
> * Get the current lock mode for the entity instance.
> * @param entity
> * @return lock mode
> * @throws TransactionRequiredException if there is no
> * transaction
> * @throws IllegalArgumentException if the instance is not a
> * managed entity and a transaction is active
> */
> public LockModeType getLockMode(Object entity);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1344) Query [get|set]LockMode not throwing correct exceptions

Posted by "Albert Lee (JIRA)" <ji...@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.


[jira] Resolved: (OPENJPA-1344) Query [get|set]LockMode & Em getLockMode not throwing correct exceptions

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee resolved OPENJPA-1344.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

> Query [get|set]LockMode & Em getLockMode not throwing correct exceptions
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-1344
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1344
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.0.0-M2, 2.0.0-M3
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>            Priority: Minor
>             Fix For: 2.0.0-M4, 2.0.0
>
>
> [get|set]LockMode method in Query interface do not throw correct exception per spec.
> - No check on the query type and throw IllegalStateException
> - Thrown TransactionRequiredException 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);
> -----------------------------
> getLockMode method in EntityManager interface do not throw correct exception per spec.
> - No check in active transaction and throw TransactionRequiredException
> - No check if entity is attached and throw IllegalArgumentException
> /**
> * Get the current lock mode for the entity instance.
> * @param entity
> * @return lock mode
> * @throws TransactionRequiredException if there is no
> * transaction
> * @throws IllegalArgumentException if the instance is not a
> * managed entity and a transaction is active
> */
> public LockModeType getLockMode(Object entity);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1344) Query [get|set]LockMode & Em getLockMode not throwing correct exceptions

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-1344:
----------------------------------

    Fix Version/s:     (was: 2.0.0)

> Query [get|set]LockMode & Em getLockMode not throwing correct exceptions
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-1344
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1344
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.0.0-M2, 2.0.0-M3
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>            Priority: Minor
>             Fix For: 2.0.0-beta
>
>
> [get|set]LockMode method in Query interface do not throw correct exception per spec.
> - No check on the query type and throw IllegalStateException
> - Thrown TransactionRequiredException 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);
> -----------------------------
> getLockMode method in EntityManager interface do not throw correct exception per spec.
> - No check in active transaction and throw TransactionRequiredException
> - No check if entity is attached and throw IllegalArgumentException
> /**
> * Get the current lock mode for the entity instance.
> * @param entity
> * @return lock mode
> * @throws TransactionRequiredException if there is no
> * transaction
> * @throws IllegalArgumentException if the instance is not a
> * managed entity and a transaction is active
> */
> public LockModeType getLockMode(Object entity);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.