openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim McConnell <tim.mcco...@gmail.com>
Subject Re: svn commit: r774004 - in /openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel: AbstractJDBCSeq.java NativeJDBCSeq.java
Date Wed, 13 May 2009 22:58:49 GMT
Hi Milosz, please see my comments in OPENJPA-466 concerning this change. Thanks.

mtylenda@apache.org wrote:
> Author: mtylenda
> Date: Tue May 12 17:58:55 2009
> New Revision: 774004
> 
> URL: http://svn.apache.org/viewvc?rev=774004&view=rev
> Log:
> OPENJPA-466: Get rid of possible duplicate sequence values
> 
> Modified:
>     openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/AbstractJDBCSeq.java
>     openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
> 
> Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/AbstractJDBCSeq.java
> URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/AbstractJDBCSeq.java?rev=774004&r1=774003&r2=774004&view=diff
> ==============================================================================
> --- openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/AbstractJDBCSeq.java
(original)
> +++ openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/AbstractJDBCSeq.java
Tue May 12 17:58:55 2009
> @@ -57,8 +57,9 @@
>      public Object next(StoreContext ctx, ClassMetaData meta) {
>          JDBCStore store = getStore(ctx);
>          try {
> -            current = nextInternal(store, (ClassMapping) meta);
> -            return current;
> +            Object currentLocal = nextInternal(store, (ClassMapping) meta);
> +            current = currentLocal;
> +            return currentLocal;
>          } catch (OpenJPAException ke) {
>              throw ke;
>          } catch (SQLException se) {
> 
> Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
> URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java?rev=774004&r1=774003&r2=774004&view=diff
> ==============================================================================
> --- openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
(original)
> +++ openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
Tue May 12 17:58:55 2009
> @@ -281,9 +281,7 @@
>          ResultSet rs = null;
>          try {
>              stmnt = conn.prepareStatement(_select);
> -            synchronized(this) {
> -                rs = stmnt.executeQuery();
> -            }
> +            rs = stmnt.executeQuery();
>              if (rs.next())
>                  return rs.getLong(1);
>  
> 
> 
> 

-- 
Thanks,
Tim McConnell

Mime
View raw message