0 Replies Latest reply on Jan 16, 2006 4:28 AM by adryden

    Quick JBoss 3.2.6 BMP Caching Question

    adryden

      Hi,

      We're using EJB 1.1 on Jboss 3.2.6 and the entities that we use are BMP and we use the DAO pattern for the underlying persistance layer to Sybase 12.5.1. This is all on XP SP2.

      For BMP we've changed the configuration in the standardjboss.xml to commit option A in the attempt to try and cache the entities as much as possible.

      We then ran a test in which, via a session bean, 75 entities are loaded using the findbyPrimaryKey method. This test is then ran again immediately afterwards.

      It appears that jboss always executes the ejbFindByPrimary key method on the bean which executes the SQL against the database which obviously gives us performance problems.

      My questions are:

      1) I would have assumed that on the 2nd test, JBoss would have identified that the bean which was being searched on was already in memory and therefore did not have to execute the ejbFindByPrimaryKey against the db?

      2) If this is the case, can you give me any advice on how to implement caching with jboss 3.2.6 and BMP? i.e is there anything else i need to do other than switch the commit-option to A.

      I've copied the config for BMP beans from the standardjboss.xml below.

      Grateful for any assistance you can give me.
      Thanks in advance.
      Andy


      <container-configuration>
      <container-name>Standard BMP EntityBean</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>false</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.MetricsInterceptor
      org.jboss.ejb.plugins.EntityCreationInterceptor
      org.jboss.ejb.plugins.EntityLockInterceptor
      org.jboss.ejb.plugins.EntityInstanceInterceptor
      org.jboss.ejb.plugins.EntityReentranceInterceptor
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor
      org.jboss.ejb.plugins.EntitySynchronizationInterceptor
      </container-interceptors>
      <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
      <instance-cache>org.jboss.ejb.plugins.EntityInstanceCache</instance-cache>
      <persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</persistence-manager>
      <locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy>
      <container-cache-conf>
      <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
      <cache-policy-conf>
      <min-capacity>50</min-capacity>
      <max-capacity>1000000</max-capacity>
      <overager-period>300</overager-period>
      <max-bean-age>600</max-bean-age>
      <resizer-period>400</resizer-period>
      <max-cache-miss-period>60</max-cache-miss-period>
      <min-cache-miss-period>1</min-cache-miss-period>
      <cache-load-factor>0.75</cache-load-factor>
      </cache-policy-conf>
      </container-cache-conf>
      <container-pool-conf>
      100
      </container-pool-conf>
      <commit-option>A</commit-option>
      </container-configuration>