0 Replies Latest reply on Apr 1, 2003 1:21 PM by Claude Glauser

    security, cmr and transaction problem.

    Claude Glauser Newbie


      I get the following error when
      using the UserRolesLoginModule
      while accessing a container managed
      relationship field (java.util.Set):

      A cmr collection may only be used within the
      transaction in which it was created.

      The error will not occur without

      A session bean with transaction-required
      creates the entity bean (also trans. required)
      and accesses the cmr field.

      If the cmr filed is accessed in the entity bean itself,
      no exception is thrown.

      Here is my jboss.xml:


      How can I access a cmr collection fields of an entity bean
      in a session bean directly ?

      Changing the transaction types to
      the following values throws another

      Session: RequiresNew (all methods *).
      Entity: Mandatory (all methods *)
      Exception: TransactionRequiredLocalException,
      but the session bean has requirednew ?

      Do you know whats wrong ?

      Thank you for your answers !

      Here are my transaction enries ejb-jar.xml: