Women in Technology

Hear us Roar

  JBoss Optimizations 101
Subject:   O/R Mapping Tools and JBoss
Date:   2003-05-30 01:01:38
From:   anonymous2
Response to: O/R Mapping Tools and JBoss

So does this mean that I only need to demarcate my transaction on my SLSBs? Should I worry about having my SLSBs getting locked by JBoss?
My current implementation is configured to use UserTransaction retrieved from the JNDI and keep Hibernate's SessionTransaction it in a Thread Local. My SLSBs actually calls my own entry point for business logic which uses Hibernate codes.


Full Threads Newest First

Showing messages 1 through 2 of 2.

  • O/R Mapping Tools and JBoss
    2003-05-30 01:07:10  anonymous2 [View]

    Well, as I said, it is no more about JBoss here, but about Hibernate. From the JBoss point of view, if you use SLSB, there will be no locking (per EJB spec) and thus:
    - you may have multiple requests for the same data at the same time, it is up to hibernate to handle that correctly (if such thing is necessary)
    - the caching cannot be handled by JBoss (as no entities are involved in the process) thus it is the job of Hibernate
    - the distributed cache invalidation framework is useless as you don't use entities, so see if Hibernate has something similar

    As for transactions maybe you should think about marking your SLSB methods as "Required" instead of playing with UserTransaction (if that makes sense in your app).


    • O/R Mapping Tools and JBoss
      2003-05-30 03:43:32  anonymous2 [View]

      Thanks for those quick replies! Wasn't expecting to receive them in a day! =)