0 Replies Latest reply on Mar 22, 2004 12:58 PM by Joachim Van der Auwera

    cache not used optimally in commit option A

    Joachim Van der Auwera Expert

      I am using the following container configuration

       <container-configurations>
      
       <container-configuration extends="Standard CMP 2.x EntityBean">
       <container-name>IC-trace Entity Bean</container-name>
       <call-logging>false</call-logging>
       <sync-on-commit-only>true</sync-on-commit-only>
       <commit-option>A</commit-option>
       </container-configuration>
      
       </container-configurations>
      


      But when trying to fill my value object, I see that the DB is queried way to often. For the link fields, even though the fields have been loaded already, they seem to be queried again. See log :

      2004-03-22 16:40:43,353 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.DMWeightGroupEJB] Executing SQL: SELECT f_AccessKey, f_AnimalCount, f_ArticleRestricted, f_Date, f_DeclarationComment, f_DocumentNumber, f_DocumentType, f_ERPDossier, f_ERPImportStatus, f_FailedCount, f_FirstFailedAccess, f_LicensePlate, f_LineIdentifierLast, f_LocalReference, f_Locked, f_Reference, f_Species, UNID_CREATION, UNID_MODIFIED, UNID_TYPE, f_Client_UOID, f_Batch_UOID, f_Destination_UOID, f_Transporter_UOID, f_AnimalResponsible_UOID, f_Declarer_UOID FROM T_WEIGHTGROUP WHERE (UNID_UOID=?)
      2004-03-22 16:40:43,353 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.DMWeightGroupEJB#UOID] Set parameter: index=1, jdbcType=CHAR, value=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.DMWeightGroupEJB.batch] Read ahead cahce load: cmrField=batch pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] load data: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] No preload data found: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.DMWeightGroupEJB] load relation SQL: SELECT f_Batch_UOID FROM T_WEIGHTGROUP WHERE (UNID_UOID=?)
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.DMWeightGroupEJB#UOID] Set parameter: index=1, jdbcType=CHAR, value=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.DMWeightGroupEJB.declarer] Read ahead cahce load: cmrField=declarer pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] load data: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] No preload data found: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.DMWeightGroupEJB] load relation SQL: SELECT f_Declarer_UOID FROM T_WEIGHTGROUP WHERE (UNID_UOID=?)
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.DMWeightGroupEJB#UOID] Set parameter: index=1, jdbcType=CHAR, value=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.DMWeightGroupEJB.animalResponsible] Read ahead cahce load: cmrField=animalResponsible pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] load data: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] No preload data found: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.DMWeightGroupEJB] load relation SQL: SELECT f_AnimalResponsible_UOID FROM T_WEIGHTGROUP WHERE (UNID_UOID=?)
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.DMWeightGroupEJB#UOID] Set parameter: index=1, jdbcType=CHAR, value=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.DMWeightGroupEJB.client] Read ahead cahce load: cmrField=client pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,416 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] load data: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,432 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMWeightGroupEJB] No preload data found: entity=DMWeightGroupEJB pk=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,432 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.DMWeightGroupEJB] load relation SQL: SELECT f_Client_UOID FROM T_WEIGHTGROUP WHERE (UNID_UOID=?)
      2004-03-22 16:40:43,432 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.DMWeightGroupEJB#UOID] Set parameter: index=1, jdbcType=CHAR, value=aikfj9Vz9x0iuD
      2004-03-22 16:40:43,432 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMCompanyEJB] load data: entity=DMCompanyEJB pk=Tikfj9Vz9x0iuD
      2004-03-22 16:40:43,432 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.DMCompanyEJB] No preload data found: entity=DMCompanyEJB pk=Tikfj9Vz9x0iuD
      


      Joachim