My name is John and I am having some difficulty getting CMR to work.
I was hoping you could answer some questions.
I have two EJBs the first BillingEJB has a ContactEJB, it is a unidirectional one to
one relationship.
My first question is the <ejb-relationship-role> in the jbosscmp-jdbc.xml file
<ejb-relationship-role>
<ejb-relationship-role-name>
Billing-Has-Contact
</ejb-relationship-role-name>
<key-fields>
<key-field>
<!-- Note: Field in Billing. -->
<field-name>billingId</field-name>
<!-- Note: Column in Contact table. -->
<column-name>phoneNumber</column-name>
</key-field>
</key-fields>
</ejb-relationship-role>
As I understand it the reference EJB is Billing so why do I have specify its key?
shouldn't it be something like
<key-fields>
<key-field>
<!-- Note: Field in Billing. -->
<field-name>
contactPhoneNumber
</field-name> THE FOREIGN KEY
<!-- Note: Column in Contact table. -->
<column-name>
phoneNumber
</column-name> THE PK in ContactEJB
</key-field>
</key-fields>
My second question is does it make any sense to have a remote interface with an EJB
that has a CMR relationship. The reason I state this is because as I currently
understand it, only the local interface can only be used to set the cmr field in the
postCreate method. Which leads me to see the requirement for session EJB's because
they would have to "wire" all this stuff together server side for the client.
Any help would be greatly appreciated
John Menarek
<a
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3827238#3827238">View
the original post</a>
<a
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3827238>Reply
to the post</a>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user