2 Replies Latest reply on Jan 26, 2005 10:22 AM by Hari Velappan

    cmp2.x jdbc2 pm with cache invalidation

    Hari Velappan Newbie

      My understainding is If I use this container configuration(cmp2.x jdbc2 pm with cache invalidation) , an entity bean will be created for every transaction and the data for the entity bean will be fetched from the global cache. But When I execute the get method on entity bean from different transactions, I can see the ejbLoad getting invoked and I can see the SQL used for the ejbLoad. I am confused, when is the global cache used. I will appreciate if we somebody can provide some information on this.
      the following is my setting

      <container-configuration>
      <container-name>cmp2.x jdbc2 pm with cache invalidation</container-name>
      <call-logging>false</call-logging>
      <invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-binding-name>
      <sync-on-commit-only>false</sync-on-commit-only>
      <insert-after-ejb-post-create>true</insert-after-ejb-post-create>
      <call-ejb-store-on-clean>true</call-ejb-store-on-clean>
      <container-interceptors>
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
      org.jboss.ejb.plugins.LogInterceptor
      org.jboss.ejb.plugins.SecurityInterceptor
      org.jboss.ejb.plugins.TxInterceptorCMT
      org.jboss.ejb.plugins.EntityCreationInterceptor
      org.jboss.ejb.plugins.EntityInstanceInterceptor
      org.jboss.ejb.plugins.EntityReentranceInterceptor
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor
      org.jboss.ejb.plugins.EntitySynchronizationInterceptor
      org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor
      org.jboss.ejb.plugins.cmp.jdbc2.RelationInterceptor
      </container-interceptors>
      <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
      <instance-cache>org.jboss.ejb.plugins.PerTxEntityInstanceCache</instance-cache>
      <!-- persistence-manager>org.jboss.ejb.plugins.cmp.jdbc2.JDBCStoreManager2</persistence-manager -->
      <persistence-manager>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager</persistence-manager>
      <locking-policy>org.jboss.ejb.plugins.lock.NoLock</locking-policy>
      <container-cache-conf>
      <cache-policy-conf>
      <min-capacity>500</min-capacity>
      <max-capacity>10000</max-capacity>
      </cache-policy-conf>
      <cache-policy-conf-other>
      10
      <!-- uncomment to use JDBC java.sql.Statement.executeBatch()
      <batch-commit-strategy/>
      -->

      </cache-policy-conf-other>
      </container-cache-conf>
      <container-pool-conf>
      100
      </container-pool-conf>
      <commit-option>C</commit-option> <!-- don't change, irrelevant, use container-cache-conf -->
      </container-configuration>