Hi,
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
security.
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 collection fields of an entity bean
in a session bean directly ?
Changing the transaction types to
the following values throws another
error:
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:
<container-transaction>
<ejb-name>CrimeSession</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
<trans-attribute>RequiresNew</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>