Hello Bertrand, it's not a problem. It's rule. Do you really use cmr collections in a transaction that didn't create them?
Tuesday, July 30, 2002, 6:43:55 PM, you wrote: BP> Hi, BP> I have a problem with my CMP entity bean with 1:N relation BP> Deployement is ok, but when I want use a relation method, I have the error BP> 17:11:46,279 ERROR [STDERR] java.lang.IllegalStateException: A CMR BP> collection may only be used within the transction in which it was created BP> Does anybody know something about this problem ? BP> thank you ! BP> regards BP> bertrand paquet BP> PS : here is my configuration : BP> orderBean.java : BP> public abstract Collection getMessages(); BP> it's when I call this function that I see a problem BP> order.java : BP> public Collection getMessages( ) throws java.rmi.RemoteException; BP> ejb-jar.xml : BP> <ejb-relation > BP> <ejb-relation-name>order-message-relation</ejb-relation-name> BP> <ejb-relationship-role > BP> <ejb-relationship-role-name>one-order-has-many-messages</ejb-relationship-ro le-name>> BP> <multiplicity>One</multiplicity> BP> <relationship-role-source > BP> <ejb-name>Order</ejb-name> BP> </relationship-role-source> BP> <cmr-field > BP> <cmr-field-name>messages</cmr-field-name> BP> <cmr-field-type>java.util.Collection</cmr-field-type> BP> </cmr-field> BP> </ejb-relationship-role> BP> <ejb-relationship-role > BP> <ejb-relationship-role-name>one-message-belongs-to-one-order</ejb-relationsh ip-role-name>> BP> <multiplicity>Many</multiplicity> BP> <relationship-role-source > BP> <ejb-name>Message</ejb-name> BP> </relationship-role-source> BP> </ejb-relationship-role> BP> </ejb-relation> BP> jbosscmp-jdbc.xml : BP> <ejb-relation> BP> <ejb-relation-name>order-message-relation</ejb-relation-name> BP> <foreign-key-mapping/> BP> <ejb-relationship-role> BP> <ejb-relationship-role-name>one-order-has-many-messages</ejb-relationship-ro le-name>> BP> <key-fields> BP> <key-field> BP> <field-name>id</field-name> BP> <column-name>orderIdFK</column-name> BP> </key-field> BP> </key-fields> BP> </ejb-relationship-role> BP> <ejb-relationship-role> BP> <ejb-relationship-role-name>one-message-belongs-to-one-order</ejb-relationsh ip-role-name>> BP> <fk-constraint>false</fk-constraint> BP> </ejb-relationship-role> BP> </ejb-relation> BP> ------------------------------------------------------- BP> This sf.net email is sponsored by: Dice - The leading online job board BP> for high-tech professionals. Search and apply for tech jobs today! BP> http://seeker.dice.com/seeker.epl?rel_code=31 BP> _______________________________________________ BP> JBoss-user mailing list BP> [EMAIL PROTECTED] BP> https://lists.sourceforge.net/lists/listinfo/jboss-user -- Best regards, Alex Loubyansky ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
