1 Reply Latest reply on Feb 15, 2007 2:29 AM by Umakanth Srinivasan

    read-ahead and optimization

    Umakanth Srinivasan Newbie

      4.0.1sp1 version of jboss.

      In order to optimize the execessive queries fired to database by getter methods, I tried using the read-ahead tag. I have given the details about my configuration

      * @jboss.load-group
      * name="modules"
      * description="module fields used in query"
       * @jboss.read-ahead strategy = "on-find"
       * page-size = "200"
       * eager-load-group="modules"
      
       * @ejb.finder
       * signature="java.util.Collection findByTaskId(java.lang.Long taskid)"
       * query="SELECT DISTINCT OBJECT(o) FROM Task o WHERE o.taskid = ?1"
       * description=""
       * @jboss.query
       * description="This generates jboss-ql and overwrites the original query "
       * signature="java.util.Collection findByTaskId(java.lang.Long taskid)"
       * query="SELECT DISTINCT OBJECT(o) FROM Task o WHERE o.taskid = ?1"
       * eager-load-group="modules"
       * strategy="on-find"
       * page-size="200"


      Add added @jboss.load-group name="modules" to my getter methods

      but still I don't see any cache/optimization happening with my sql queries, issue persists

      I have also removed the readonly attribute that I had set to the getter methods.

      How to use the read-ahead attribute?