> Well after toiling throught the spec I think the best way to add the
> relations code is to add the tags at the method level.
> Something like
>
> OrderEJB
>
> /**
> @ejb:relation name="Order-LineItem" multiplicity="One"
> */
> public abstract Collection getLineItems();
>
> and in LineItemEJB
>
> /**
> @ejb:relation name="Order-LineItem" multiplicity="Many"
> cascade-delete="true"
> */
> public abstract int getOrderId();
>
>
> to generate
>
> <ejb-relation>
> <ejb-relation-name>Order-LineItem</ejb-relation-name>
> <ejb-relationship-role>
> <multiplicity>One</multiplicity>
> <relactionship-role-source>
> <ejb-name>OrderEJB</ejb-name>
> </relactionship-role-source>
> <cmr-field>
> <cmr-field-name>lineItems</cmr-field-name>
> <cmr-field-type>java.util.Collection</cmr-field-type>
> </cmr-field>
> </ejb-relationship-role>
>
> <ejb-relationship-role>
> <multiplicity>Many</multiplicity>
> <cascade-delete/>
> <relationship-role-source>
> <ejb-name>LineItemEJB</eib-name>
> <relationship-role-source>
> <cmr-field>
> <cmr-field-name>orderId</cmr-field-name>
> </cmr-field>
> </relationship-role-source>
> </ejb-relation>
>
Agree.
> Now there are two problems
> 1) I need to be able to keep a list of relation tags so I can look up
> the other side of the relation and then I need to remove both of them
> from the list when I am done. Otherwise each entry will be in there
twice
See AbstractEjbSubTask.forAllSecurityRoles(). It loops over all beans,
extracts roles and works on them. You'll probably do something like
that. Also look how it's used in asm-descriptor.j.
> 2) I need to add the option unidirect-ejbname so if it is a
> unidircetional relationship I don't go looking for the matching class.
I don't think there's a need for jumping from the source class to the
other end at all.
Ara.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/xdoclet-devel