Discussions

EJB programming & troubleshooting: how to set the maximum number of records returned in EJB

  1. I'm using JbuilderX + Weblogic8.1, could anyone let me know how to set the maximum # of records returned using finder or ejbSelect methods?
  2. Don't know about WebLogic, but as far as I'm concerned you can't do it with EJB 2.x. You might like to use direct jdbc or ibatis or hibernate for this task. Take a look at the Fastlane Pattern or JDBC for reading pattern.
  3. Soory dont know for WLS, But found this for JBOSS

    jbosscmp-jdbc.xml

    <read-ahead>
      <strategy>on-find</strategy>
      <page-size>255</page-size>
      <eager-load-group>*</eager-load-group>
    </read-ahead>
  4. Bless.. I found this on WLS 7.0 edocs site

    check - <RowPrefetchSize>

    <JDBCDataSource
      ConnectionWaitPeriod="number"
      DeploymentOrder="number"
      JNDIName="String"
      Name="String"
      Notes="String"
      PoolName="String"
      RowPrefetchEnabled=( "true" | "false" )
      RowPrefetchSize="number"
      StreamChunkSize="number of bytes"
      Targets="list of Target names"
      WaitForConnectionEnabled=( "true" | "false" )
    />

    Hope this helps...
  5. Bless.. I found this on WLS 7.0 edocs site

    check - <RowPrefetchSize>

    <JDBCDataSource
      ConnectionWaitPeriod="number"
      DeploymentOrder="number"
      JNDIName="String"
      Name="String"
      Notes="String"
      PoolName="String"
      RowPrefetchEnabled=( "true" | "false" )
      RowPrefetchSize="number"
      StreamChunkSize="number of bytes"
      Targets="list of Target names"
      WaitForConnectionEnabled=( "true" | "false" )
    />

    Hope this helps...