1 Reply Latest reply on Apr 1, 2003 1:27 PM by Claude Glauser

    CMR, Transactions and security problem.

    Claude Glauser Newbie

      Hi,

      I have the following problem:
      I get the following error when
      using the UserRolesLoginModule
      while accessing a container managed
      relationship field (Set):

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

      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:

      <security-domain>java:/jaas/other</security-domain>
      ......

      How can I access a cmr filed of an entity bean
      in a session bean (remote) directly ?

      Changing the transaction types to
      the following values throws another
      error:

      Session: RequiresNew (all methods *).
      Entity: Mandatory (all methods *)
      Exception: TransactionRequiredLocalException


      Do you know whats wrong ?

      Here are my transaction enries:


      <container-transaction>


      <ejb-name>CrimeSession</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>*</method-name>


      <trans-attribute>Required</trans-attribute>
      </container-transaction>

      <container-transaction>

      <ejb-name>OrganizationEJB</ejb-name>
      <method-name>*</method-name>


      <ejb-name>GangsterEJB</ejb-name>
      <method-name>*</method-name>


      <ejb-name>JobEJB</ejb-name>
      <method-name>*</method-name>


      <trans-attribute>Required</trans-attribute>
      </container-transaction>