You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Si Chen (JIRA)" <ji...@apache.org> on 2006/10/30 21:23:16 UTC

[jira] Created: (OFBIZ-413) Sequenced ID value limited to Integer not Long

Sequenced ID value limited to Integer not Long
----------------------------------------------

                 Key: OFBIZ-413
                 URL: http://issues.apache.org/jira/browse/OFBIZ-413
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: framework
            Reporter: Si Chen
            Priority: Minor


I just  found a small problem with SequenceUtil - it calls the getInt instead of the getLong method on the ResultSet query, so large sequence values (exceeding the Java integer limit of 2147483647 will not work.

I made this change to SequenceUtil and now it works fine.  Just wanted to check to make sure nobody has any objections before committing this...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (OFBIZ-413) Sequenced ID value limited to Integer not Long

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-413?page=all ]

Si Chen reassigned OFBIZ-413:
-----------------------------

    Assignee: Si Chen

> Sequenced ID value limited to Integer not Long
> ----------------------------------------------
>
>                 Key: OFBIZ-413
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-413
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Si Chen
>         Assigned To: Si Chen
>            Priority: Minor
>         Attachments: seqid.patch
>
>
> I just  found a small problem with SequenceUtil - it calls the getInt instead of the getLong method on the ResultSet query, so large sequence values (exceeding the Java integer limit of 2147483647 will not work.
> I made this change to SequenceUtil and now it works fine.  Just wanted to check to make sure nobody has any objections before committing this...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-413) Sequenced ID value limited to Integer not Long

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-413?page=comments#action_12445716 ] 
            
David E. Jones commented on OFBIZ-413:
--------------------------------------

This looks fine to me.

So, are you working with a site that is running up against 2 billion customers, or even 2 billion server hits... ? ;)

> Sequenced ID value limited to Integer not Long
> ----------------------------------------------
>
>                 Key: OFBIZ-413
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-413
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Si Chen
>         Assigned To: Si Chen
>            Priority: Minor
>         Attachments: seqid.patch
>
>
> I just  found a small problem with SequenceUtil - it calls the getInt instead of the getLong method on the ResultSet query, so large sequence values (exceeding the Java integer limit of 2147483647 will not work.
> I made this change to SequenceUtil and now it works fine.  Just wanted to check to make sure nobody has any objections before committing this...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-413) Sequenced ID value limited to Integer not Long

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-413?page=all ]

Si Chen updated OFBIZ-413:
--------------------------

    Attachment: seqid.patch

Here is the file of the change, and it is very simple:
Index: framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java
===================================================================
--- framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java        (revision 710)
+++ framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java        (working copy)
@@ -203,7 +203,7 @@
                             rs = stmt.executeQuery(sql);
                             boolean gotVal1 = false;
                             if (rs.next()) {
-                                val1 = rs.getInt(parentUtil.idColName);
+                                val1 = rs.getLong(parentUtil.idColName);
                                 gotVal1 = true;
                             }
                             rs.close();
@@ -226,7 +226,7 @@
                             rs = stmt.executeQuery(sql);
                             boolean gotVal2 = false;
                             if (rs.next()) {
-                                val2 = rs.getInt(parentUtil.idColName);
+                                val2 = rs.getLong(parentUtil.idColName);
                                 gotVal2 = true;
                             }
 


> Sequenced ID value limited to Integer not Long
> ----------------------------------------------
>
>                 Key: OFBIZ-413
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-413
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Si Chen
>            Priority: Minor
>         Attachments: seqid.patch
>
>
> I just  found a small problem with SequenceUtil - it calls the getInt instead of the getLong method on the ResultSet query, so large sequence values (exceeding the Java integer limit of 2147483647 will not work.
> I made this change to SequenceUtil and now it works fine.  Just wanted to check to make sure nobody has any objections before committing this...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (OFBIZ-413) Sequenced ID value limited to Integer not Long

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-413?page=all ]

Si Chen closed OFBIZ-413.
-------------------------

    Resolution: Fixed

Thanks for lookig at it, David.

No, we haven't grown that much...just working with somebody who wanted to use very long ID sequence numbers by default.

But there's always hope!

> Sequenced ID value limited to Integer not Long
> ----------------------------------------------
>
>                 Key: OFBIZ-413
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-413
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Si Chen
>         Assigned To: Si Chen
>            Priority: Minor
>         Attachments: seqid.patch
>
>
> I just  found a small problem with SequenceUtil - it calls the getInt instead of the getLong method on the ResultSet query, so large sequence values (exceeding the Java integer limit of 2147483647 will not work.
> I made this change to SequenceUtil and now it works fine.  Just wanted to check to make sure nobody has any objections before committing this...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira