beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Johnson (JIRA)" <>
Subject [jira] Created: (BEEHIVE-1126) value of 0 not allowed for arrayMaxLength on JDBCControl statement
Date Tue, 20 Jun 2006 22:59:30 GMT
value of 0 not allowed for arrayMaxLength on JDBCControl statement

         Key: BEEHIVE-1126
     Project: Beehive
        Type: Bug

  Components: System Controls  
    Versions: 1.0.1    
    Reporter: Jeremiah Johnson
 Assigned to: Chad Schoettger 
    Priority: Minor
     Fix For:

I believe that the JDBC Control is trying to protect the end-user from causing a run-time
crash by setting the default value of the array max to 1024.  In the case that end-users are
adjusting the value, they currently have to pick a magic number for the max value because
'0' is not an option.  Not allowing a value of 0 seems like a bug because some users may find
0 as the most appropriate value for the setting; in addition, an enhancement that would be
helpful in the documentation would be giving some additional detail about the setting.

For example, consider changing the javadoc around arrayMaxLength in two ways: 1. warn that
the value defaults to 1024 in an effort to keep unknowing end-users from getting a runtime
error from trying to stuff too much data into the return array and that a value of 0 may cause
a runtime failure if the runtime database returns much larger result sets than testing 2.
define why arrayMaxLength is different than maxRows and that a JDBCControl method returning
an array forces all processing and array contents to go into memory.

Current docs are here:

Repro (rev 415831)
1. build beehive
2. cd beehive/system-controls
3. ant drt
4. edit test/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx
   - change @SQL(statement="SELECT * FROM USERS", arrayMaxLength=2)
     to @SQL(statement="SELECT * FROM USERS", arrayMaxLength=0)
5. ant drt

- no difference

  [xmlbean] Time to compile code: 2.075 seconds
     [echo] ** Phase One **
Trying to override old definition of task apt
      [apt] Compiling 1 source file to /home/jerjohns/projects/beehive/system-co
      [apt] warning: Annotation types without processors: [
ntrols.system.jdbc.JdbcControl.ConnectionDriver, org.apache.beehive.controls.sys
      [apt] /home/jerjohns/projects/beehive/system-controls/build/test-classes/c
ontrols-generated-src/org/apache/beehive/controls/system/jdbc/test/results/Resul SQL annotation on method: getCustomerArrayLimitedSize : arr
ayMaxLength set to invalid value (must be greater than 0): 0
      [apt]     public Customer[] getCustomerArrayLimitedSize() throws SQLExcept
      [apt]                       ^
      [apt] 1 error
      [apt] 1 warning

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message