Hi Aslak
Thanks for your answers.

First:
Ok I will try the CVS version instead.

Second:
> Do you want to work with relations remotely? Could you express more
> accurately why you want relations on Data objects? AFAIK there are no
> plans, but if there is a good reason to implement it, we'll consider it.

hmm... Some background: I use the Maverick framework
(http://mav.sourceforge.net/) and have found out that the best way to send
data to the web layer is through Data Objects (Value Object pattern
according to Javasoft). Maverick provides an XML representation of a
returned object and the associated collections of objects. This is then used
together with XSLT docs to render web pages. I tried to return local
interfaces to Maverick but bi-diractional made its recursional nature to go
into a spin. The solution is to return Data Objects in a controlled manner;
the root object shall only have branches and no references back to 'parent'
objects.
Depending on what object I want to send to Maverick, I need to be able to
control which related object that shall go with it. I thought that it would
be a great thing to automate with xdoclet.

Solutions:
1. This is a Maverick problem, stop bugging us.
2. This is interesting and providing relations between Data Objects should
be considered.


Third:
Sorry about that, it wont happen again.

/johan
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Johan Lundberg" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 08, 2001 6:52 PM
Subject: Re: RE: [Xdoclet-user] @ejb:relation in xdoclet 1.0.1


> Hi Johan. Thanks for your comments. Here are my answers:
>
> First:
> Get the latest version from CVS when you want to comment something you
> think is a bug. Not only the docs, but also the examples have been
> updated after the release of the 1.0.1 zip file. The multiple attribute
> is not only deprecated, but removed altogether.
>
> (The multiple attribute was there to describe the multiplicity of each
> CMR method, which means that if return value is Set or Collection,
> you'd have to set multiple="true" on that same method's @ejb:relation.
> But that was before. It provided redundant information, as multiplicity
> can be deduced from the method signature.)
>
> Second:
> Do you want to work with relations remotely? Could you express more
> accurately why you want relations on Data objects? AFAIK there are no
> plans, but if there is a good reason to implement it, we'll consider it.
>
> Third:
> Please post technical questions to the list, not to me personally.
>
>
>
> ----- Original Message -----
> From: "Johan Lundberg" <[EMAIL PROTECTED]>
> Date: Monday, October 8, 2001 4:56 pm
> Subject: RE: [Xdoclet-user] @ejb:relation in xdoclet 1.0.1
>
> > This message was sent from Geocrawler.com by "Johan Lundberg"
> > <[EMAIL PROTECTED]>
> > Aslak
> >
> > I have been digging into the cmr-examples that
> > you seemingly have written.
> >
> > First:
> > I found this:
> > <<
> >    * @ejb:relation
> >    *    name="country-city"
> >    *    role-name="one-country-has-many-city"
> >    *    multiple="yes"
> > >>
> > where multiple="yes" is not covered in the CVS
> > documentation.
> >
> > I have tried it and i works in my implementation,
> > but don't you use it on the wrong side of the
> > relationship?
> >
> > You say the following in the CountryBean doc:
> > <<
> > * This bean represents the one-side of an 1:n
> > bidirectional CMR relationship
> > >>
> >
> > but in the relation to the City bean you write
> > this:
> > <<
> >   /**
> >    * @return all cities of this country
> >    *
> >    * @ejb:interface-method view-type="local"
> >    * @todo remove the multiple parameter when
> > ejb:relation is updated to
> > figure it out from return type
> >    * @ejb:relation
> >    *    name="country-city"
> >    *    role-name="one-country-has-many-city"
> >    *    multiple="yes"
> >    *
> >    * @weblogic:relation
> >    *    name="country-city"
> >    */
> >   public abstract java.util.Collection getCities
> > ();
> > >>
> >
> > To me it works the other way around and the
> > following code snippet from the
> > CityBean should have the
> > <<multiple="yes">> attribute.
> > <<
> >   /**
> >    * @return country of this city
> >    *
> >    * @ejb:interface-method view-type="local"
> >    * @ejb:relation
> >    *    name="country-city"
> >    *    role-name="many-city-have-one-country"
> >    *
> >    * @weblogic:relation
> >    *    name="country-city"
> >    *    key-column="id"
> >    *    foreign-key-column="country_id"
> >    */
> >   public abstract CountryEJBLocal getCountry();
> > >>
> >
> > Correct me if I am wrong. I studied the generated
> > xml file and I think that I am right.
> >
> >
> > Second:
> > I found the data object that is generated by
> > xdoclet to be very useful, but it does not
> > support relations to other data objects. Do you
> > know of any plans that would extend the generated
> > data object to support relations?
> >
> >
> > Best regards
> > /johan
> >
> >
> >
> >
> > ---------------------------------------
> > It should be ok in the latest CVS. Here is the
> > doc snippet:
> >
> > @ejb:relation
> > Define a relationship for an Entity bean.
> > Applicable only to EJB2.0 CMP2.x
> > beans.
> >
> > Parameter Usage
> > [name]: String Name of the relation. For
> > bidirectional relationships,
> > specify the same name on both sides.
> > [role-name]: String Name of a relationship role.
> > [cascade-delete]: String Indicates whether or not
> > the app server should
> > perform cascade deletes. If yes, specify cascade-
> > delete="yes"
> > [target-ejb]: String Name of the EJB on the other
> > side of the relation.
> > Should *only* occur if the relation is
> > unidirectional.
> > [target-role-name]: String Name of the
> > relationship role on the other side
> > of the relation. Should *only* occur if the
> > relation is unidirectional.
> > [target-cascade-delete]: String Indicates whether
> > or not the app server
> > should perform cascade deletes for the other side
> > of the relation. If yes,
> > specify cascade-delete="yes". Should *only* occur
> > if the relation is
> > unidirectional.
> > [target-multiple]: String If this EJB represents
> > a many-side of the other
> > side of the relation, specify target-
> > multiple="yes". Should *only* occur if
> > the relation is unidirectional.
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]
> > On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: 7. oktober 2001 18:34
> > To: [EMAIL PROTECTED]
> > Subject: [Xdoclet-user] @ejb:relation in xdoclet
> > 1.0.1
> >
> >
> > Can anyone explain how to use the @ejb:relation
> > tag since the new version
> > 1.0.1 does not seem to correspond with the
> > bundled documentation.
> >
> > regards
> > johan
> >
> >
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdocl
> > et-user
> >
> >
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdocl
> > et-user
> >
> >
> >
> > Geocrawler.com - The Knowledge Archive
> >
>


_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to