0 Replies Latest reply on Jul 25, 2003 4:53 AM by mfrost

    Able to remove() read-only CMP Entity bean

    mfrost

      I have a CMP Entity Bean. I've set it to read-only in the jboss.xml deplyment descriptor, yet I'm able to perform remove operations. Why is this?

      Many thanks
      Mark




      Code:

      XmlCompanyROHome home = <lookup code>
      XmlCompanyRO xml = home.findByPrimaryKey(new Long(1));
      xml.remove(); //no error thrown and entity deleted!


      Extract from jboss.xml:


      <ejb-name>XmlCompanyRO</ejb-name>
      <jndi-name>local/XmlCompanyRO</jndi-name>
      <read-only>true</read-only>

      jboss.jca:name=hemscottDS,service=LocalTxCM

      <configuration-name>Standard CMP 2.x EntityBean with cache invalidation</configuration-name>
      <cache-invalidation>True</cache-invalidation>
      <cache-invalidation-config>
      <invalidation-group-name>CompanyXmlCacheGroup</invalidation-group-name>
      </cache-invalidation-config>