Hi,

On Wed, 2003-07-16 at 15:08, Jungho Kim wrote:
> > In attempting to generate weblogic deployment descriptors for EJB's I
> > get a weblogic-ejb-jar.xml created successfully, yet I then encounter
> > the insistence of xdoclet (1.2b3) that I need
> >
> > @weblogic:relation join-table-name="blabla"
> >
> > in my classes where there are relationships defined for EJB.
> > My question is, why does xdoclet INSIST on this ?
> 
> Please provide examples of your tagged CMR fields.

Not necessary. My question was not for my particular case and was
general, relating to WebLogic and whether it insists that you specify
these relationships in the WebLogic CMP descriptor - the thing being
that XDoclet should enforce the rules embodied by the J2EE server that
it is representing. Your response suggests that WebLogic does NEED these
tags in the weblogic-cmp-rdbms-jar.xml, so that answers my question.

> The EJB2.0 spec does not say anything about how entity beans are mapped to
> tables.  In fact the datastore doesn't even have to be a RDBMS.  The spec
> states that it is the responsibility of the "deployer" to map the abstract
> schema to the physical schema.  [Section 10.2]

OK. I guess I'm coming from a JBoss background where JBoss makes
educated guesses to provide a 'default' implementation, and was assuming
that the same would apply to 'Industry Leading' WebLogic :-)


The fact is that all relationships - foreign key based, or join table
based *could be* guessed by the container (based on the @ejb.relation
tags) to provide a 'default' :
1:1 -> foreign key on one or both of tables of beans involved, depending
if is uni-directional or bi-directional. 
1:N -> foreign key on one or both of tables of beans involved, depending
if is uni-directional or bi-directional. 
In both of these cases the foreign key would be the primary key of the
table of the other bean. 

M:N -> join table containing primary keys of tables of both beans
concerned. 

This is what JBoss does as default if you supply no relationship info in
its jbosscmp-jdbc.xml (though it leaves it for the user to provide them
when they want - for example if they are mapping to an existing DB and
want the foreign key names to match what they already have).

Oh well :-)

> > If I really HAVE to provide these 'link-table' names, what am I supposed
> > to put in there ... any name I feel like ... the thing is, I want the
> > container to create the table for me and handle all use of it so I
> > really don't care what its called.
> 
> here's an example of M:N.  i also had @ejb.persistence table-name="..."
> defined at the class level for both CMP beans.

Thanks for the example. I've added all WebLogic tags and all is working
now.


-- 
Andy


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to