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

    read-only and row-locking

    mkyaj

      Hi,

      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?
      or
      Both these are unrelated to each other?

      Thanks,
      Murali.

        • 1. Re: read-only and row-locking
          dhartford

          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).

          xdoclet-wise:
          *@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?

          -D