1 Reply Latest reply on Aug 21, 2007 9:30 PM by Nisarg Parikh

    JBoss 3.2.6 BMP Caching Question

    Andy Dryden Newbie


      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.

      <container-name>Standard BMP EntityBean</container-name>
      <call-logging>false</call-logging> <invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-binding-name>

        • 1. Re: JBoss 3.2.6 BMP Caching Question
          Nisarg Parikh Newbie

          Hi Adryden,
          We are having a similar issue. In our case EntityBean is a readonly entityBean, so we create an entitybean, from the client, which get persisted in our database through an external service. But does not happen immediately. The problem is we depend on entitybean being in cache, and thought it wont call findByPrimaryKey since its already in cache.
          But it seems to be going to the database. and its not able to find the primarykey and thorows finder exception. (as there is some delay in persisting data through external systems)

          How does JBoss app server remove the entitybean from the cache?

          any help is appreciated.