Actually,

This morning I did some experimenting and discovered that this wasn't the problem.

What I had (mostly from ignorance) was @ejb:persistent-field flags on BOTH
the getters and the setters.  Removing that from the setter resulted
in the correct jaws.xml being generated.  I guess the old pre-refactored
code hid this for me.

I now have only @ejb:interface on the setter.  All of the other tags are on the getter.
I hope this is correct..

Russ




On Wed, Feb 13, 2002 at 08:14:39AM +0100, Vincent Harcq wrote:
> At the same time we should support what you do as well I think...  Can
> you enter a bug report on SF ?
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED]] On Behalf 
> > Of Vincent Harcq
> > Sent: mercredi 13 f�vrier 2002 8:07
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: [Xdoclet-user] Move from v1 to XDoclet-v1-1-1 
> > causes duplication in jaws.xml
> > 
> > 
> > Hi,
> > You should not duplicate
> >          * @ejb:persistent-field
> >          * @ejb:pk-field
> > On the setter method.
> > 
> > Regards.
> > 
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]] On Behalf 
> > > Of Russell Chan
> > > Sent: mercredi 13 f�vrier 2002 5:08
> > > To: [EMAIL PROTECTED]
> > > Subject: [Xdoclet-user] Move from v1 to XDoclet-v1-1-1 causes 
> > > duplication in jaws.xml
> > > 
> > > 
> > > Hi,
> > > 
> > > I've been successfully using jboss 2.4 with xdoclet (cvs tag
> > > version xdoclet-1-0).
> > > 
> > > However, I've needed some of the newer merging stuff in the
> > > newer versions so have switched to using the XDoclet-v1-1-1 
> > revision.
> > > 
> > > I'm finding that the xml generated in the jaws.xml file has
> > > duplication for all the members.  It seems that I get two 
> > > copies of each cmp-field, 
> > > one with the correct column name (I'm using the 
> > > jboss:column-name xdoclet method tag), and one with what 
> > > appears to be the field name repeated.
> > > 
> > > Needless to say, this is completely borking my ear file and
> > > it doesn't deploy properly. Before I start on customizing the 
> > > template to fix this, I was hoping someone might have seen 
> > > this, or rather tell me what I'm doing wrong...
> > > 
> > > Here's an example snippet showing the problem from the
> > > generated jaws.xml file:
> > > 
> > >       <entity>
> > >          <ejb-name>offnet/Config</ejb-name>
> > > 
> > >          <cmp-field>
> > >             <field-name>name</field-name>
> > >             <column-name>NAME</column-name>
> > > 
> > >          </cmp-field>
> > >          <cmp-field>
> > >             <field-name>value</field-name>
> > >             <column-name>VALUE</column-name>
> > > 
> > >          </cmp-field>
> > >          <cmp-field>
> > >             <field-name>name</field-name>
> > >             <column-name>name</column-name>
> > > 
> > >          </cmp-field>
> > >          <cmp-field>
> > >             <field-name>value</field-name>
> > >             <column-name>value</column-name>
> > > 
> > >          </cmp-field>
> > > 
> > >          <table-name>CONFIG</table-name>
> > >          <create-table>true</create-table>
> > >          <remove-table>false</remove-table>
> > >          <tuned-updates>true</tuned-updates>
> > > 
> > > 
> > > Here's my ejbdoclet tag in the ant script, in case:
> > >           <ejbdoclet 
> > >                           classpathref="ejbdoclet.classpath"
> > >                           
> > > destdir="${core.ejb.src.generated.dir}" ejbspec="1.1" 
> > >                           excludedtags="@version,@author"
> > > sourcepath="${core.ejb.src.dir}">
> > > 
> > >                           <fileset dir="${core.ejb.src.dir}">
> > >                                   <include name="**/*Bean.java"/>
> > >                           </fileset>
> > > 
> > >                           <packageSubstitution
> > > packages="ejb" substituteWith="interfaces"/>
> > >                           <dataobject 
> > > mergedir="${core.xdoclet.merge.dir}"/>
> > > 
> > >                           <entitypk/>
> > >                           <entitycmp/>
> > > 
> > >                           <remoteinterface
> > > mergedir="${core.xdoclet.merge.dir}"/>
> > >                           <homeinterface 
> > > mergedir="${core.xdoclet.merge.dir}"/>
> > > 
> > >                           <deploymentdescriptor
> > > destdir="${core.ejb.build.dir}/META-INF"/>
> > >                           <jboss 
> > > datasource="${core.ejb.datasource.name}" 
> > >                                   
> > > destdir="${core.ejb.build.dir}/META-INF"
> > >                                   
> > > typemapping="${core.ejb.datasource.type}"
> > >                                   version="2.4"
> > >                                   debug="true"
> > >                                   xmlencoding="UTF-8"/>
> > >                   </ejbdoclet>
> > > 
> > > 
> > > 
> > >          <read-only>false</read-only>
> > > 
> > >       </entity>
> > > 
> > > 
> > > 
> > > 
> > > Here's some sample method code from the bean:
> > > /**
> > >  *
> > >  * @ejb:bean name="offnet/Config" type="CMP"
> > > jndi-name="ejb/offnet/Config" primkey-field="name"
> > >  * @ejb:transaction type="Required"
> > >  * @ejb:pk class="java.lang.Integer" generate="false" 
> > > package="java.lang"
> > >  * @ejb:finder signature="Collection findAll()" 
> > > unchecked="true" transaction-type="NotSupported"
> > >  * @ejb:data-object setdata="true"
> > >  *
> > >  *
> > >  *
> > >  * @jboss:table-name "CONFIG"
> > >  * @jboss:create-table "true"
> > >  * @jboss:remove-table "false"
> > >  * @jboss:tuned-updates "true"
> > >  * @jboss:read-only "false"
> > >  *
> > >  * @version $Revision$
> > >  * @author $Author$
> > >  */
> > > 
> > >         /** 
> > >          * getName - get NAME
> > >          *
> > >          * @ejb:interface-method view-type="remote"
> > >          * @ejb:interface-method view-type="local"
> > >          * @ejb:persistent-field
> > >          * @ejb:pk-field
> > >          * @jboss:column-name "NAME"
> > >          */
> > >         public abstract java.lang.String getName ();
> > > 
> > >         /**
> > >          * setName - set NAME
> > >          *
> > >          * @ejb:interface-method view-type="remote"
> > >          * @ejb:interface-method view-type="local"
> > >          * @ejb:persistent-field
> > >          * @ejb:pk-field
> > >          */
> > > 
> > > 
> > > --
> > > Russell Chan
> > > Stable Network Technologies Inc.
> > > PO Box 86079 
> > > Oakville, Ontario, Canada
> > > L6H 5V6
> > > 
> > > Email: [EMAIL PROTECTED]
> > > Mobile: 416 822 5200
> > > Fax: 416 867 7170
> > > 
> > > _______________________________________________
> > > Xdoclet-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> > > 
> > > 
> > 
> > 
> > 
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> > 
> > 
> 
> 
> 
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user

-- 
Russell Chan
Stable Network Technologies Inc.
PO Box 86079 
Oakville, Ontario, Canada
L6H 5V6

Email: [EMAIL PROTECTED]
Mobile: 416 822 5200
Fax: 416 867 7170

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

Reply via email to