1 Reply Latest reply on Jul 17, 2003 7:04 AM by vanitas

    How do I make an entity bean method read-only?

    cvandyck

      I want to specify that my entity's getXXX() methods are specified as read-only so that they are not included in a transaction, tying up resources unnecessarily.

      I don't want to make the entire CMP/CMR field read-only. Just the getXXXX() methods. I think something like this:


      <ejb-name>Block</ejb-name>
      <method-attributes>

      <method-name>get*</method-name>
      <read-only>true</read-only>

      </method-attributes>


      Could work, but I cannot generate this with XDoclet (I cannot find the right command to add this in). XDoclet already is generating jboss.xml, so I'm not sure how I should approach this. I have already tried merging my own XML in (as shown above), but that conflicts with the existing definition for that EJB in jboss.xml.

      What's the best way to do this? thanks :)

      Collin