0 Replies Latest reply on Mar 26, 2005 5:55 AM by massmadx

    Hibernate performance problems in JBoss

    massmadx

      Hello everyone,

      last day I did some tests concerning the performance of Hibernate within
      Jboss and "standalone".
      I came to some disappointing results
      concerning the performance within JBoss (using CMT):


      1) The datasource access seems to be significantly slower as with Hibernate "standalone".
      In some examples it was three times slower.

      2) Moreover I was not able to do caching (using Hasttable, EhCache, as well as JBoss' TreeCache) beyond the scope of a single transaction.
      This dramatically decreases the performance.
      I mean the following:
      When I perform a certain select statement for
      the first time within a transaction it takes about 750 msecs,
      if i perform it again within the same transaction (i.e., within the
      same ejb-method call) it takes 60 msecs.
      Now, if perform this transaction (i.e. ejb-method call) again and again,
      it always takes the same 750 resp. 60 msecs.
      For me it seems that there is no caching beyond transaction scope.
      Btw, I encountered no differences when using transactional, read-write,
      nonstrict-read-write caching....

      Now I wonder about the following:

      Did I do something seriously wrong?

      Is it not possible to do caching beyond the scope of a single transaction
      (which seems to be very unlogical to me)?

      Btw, I used a standard hibernate-service.xml.
      Moreover, I used postgres and the standard postgres-ds.xml.
      (but hsqldb was the same).

      Thanks a lot for your help, best wishes and happy eastern

      Michael

      **************************************************