1 Reply Latest reply on Apr 21, 2004 11:10 AM by darren hartford

    read-only and row-locking

    mkyaj Newbie


      I have declared all my get*() methods as read-only so that this bean will not be registered in any transaction when accessing the get*() methods.

      When we declare row-locking true in an entity, the loading of that entity will be done using SELECT FOR UPDATE.

      My doubt is if we declare the row-locking true and call the get*() method, then also will it use SELECT FOR UPDATE?
      Both these are unrelated to each other?


        • 1. Re: read-only and row-locking
          darren hartford Expert

          I'm having a similar issue - I'm reading getValueObject and get*fields and the row-locking 'version' vield is still incrementing (i.e. ejbStore() is still being called).

          *@ejb.bean use-soft-locking = "true"
          * @jboss.method-attributes
          * pattern="get*"
          * read-only=true
          * @jboss.method-attributes
          * pattern="find*"
          * read-only=true
          * @jboss.method-attributes
          * pattern="ejbSelect*"
          * read-only=true

          Anyone some ideas? The only thing I can think of is the Transactions need to be explicitly set to something?