Hi,

I've set up a straightfroward one-to-many CMR relationship with two
Entity Beans on JBoss 4 (XDoclet declarations at the end of this post).
Calling the CMR method getAddenda() that returns the Set works
perfectly from another bean, but I would like to call it from custom
JSP tags in the web tier of the same server. When I try this, I get the
following exception:
A CMR collection may only be used within the transction in which it was
created
What do I have to do to call this method from the web tier? A sample
would be great.
Could you point me to documentation explaining this CMR restriction?


Thanks,
blu


In bean Project:
/**
* @ejb.interface-method
*
* @ejb.relation
*   name="Project-Addenda"
*   role-name="Project-has-many-Addenda"
*   target-ejb="Addendum"
*   target-role-name="Addendum-belongs-to-Project"
*/
public abstract Set getAddenda();

In bean Addendum:
/**
* @ejb.interface-method
*
* @ejb.relation
*   name="Project-Addenda"
*   role-name="Addendum-belongs-to-Project"
*   target-ejb="Project"
*   target-role-name="Project-has-many-Addenda"
*   cascade-delete="yes"
*
* @jboss.relation
*      related-pk-field="planKey"
*      fk-column="plan_key"
*      fk-constraint="false"
*/
   public abstract ProjectLocal getProject();




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3863468#3863468

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3863468


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to