1 Reply Latest reply on Aug 4, 2003 9:07 AM by Robert Costanzo

    Question on read only method configuration and wildcards

    F Zemen Newbie

      JBoss 3.2.1

      I want to specify that all my get methods are read only, but I have CMR collection get methods that must not be read only (as it causes CMR problems if they are).

      Can I use the wildcard to specify that get* is read only (read-only=true, then specfiy the specific CMR methods (e.g. getUsers) are not (read-only=false) in the jboss.xml?

      In other words, do specific methods override the wildcard entry?

      Thanks!

        • 1. Re: Question on read only method configuration and wildcards
          Robert Costanzo Newbie

          I've had issues trying to override wilcards in the descriptors for the method tags in both jboss.xml for and ejb-jar.xml (for specificying transaction levels).

          What I know will work is if you do:

          <method-attributes>

          <method-name>getCMRCollection</method-name>
          <read-only>false</read-only>


          <method-name>getSomethingElse</method-name>
          <read-only>true</read-only>

          </method-attributes>

          Which is a bit of a pain because you then need to do one stanza per method. But give it a try with the wildcard and overriding it and if it doesn't work you'll get the "can't modify a read-only collection" exception.