For WLS you can specify the datasource name globally (at the ant task level, in <weblogic datasource="bla.bla"/>), or you can do it per-bean (using the @weblogic:data-source-name tag).
The per-bean datasource is supposed to override any global settings in the Ant file, but IIRC this doesn't work properly in 1.1.2 (it's fixed in CVS). The workaround if you're on 1.1.2 is therefore to use only one of the two approaches. (I recommend you remove the tags and maintain the DS in the ant script, unless your beans will use different DSes) HTH, Aslak ----- Original Message ----- From: "Ensing, Marco" <[EMAIL PROTECTED]> Date: Thursday, June 6, 2002 6:48 pm Subject: [Xdoclet-user] @weblogic:data-source xdoclet.samples? > This is related to: @weblogic:data-source-name > > > > The generated weblogic file: weblogic-cmp-rdbms-jar.xml, has a > reference to xdoclet.samples while I had it defined as > xdoclet.database > > > Allthough (I think) I don't have a xdoclet.samples datasource > defined anywhere. > > > > Anybody noticed similar problem? > > > > Regards, > > > > Marco > > > > Attached code from PersonBean.java and the generated weblogic-cmp- > rdbms-jar.xml > > > > ---------------code ------------------ > > > > PersonBean.java: > > > > > > package test.ejb; > > > > import java.util.Collection; > > import javax.ejb.*; > > import javax.naming.*; > > > > //These files will be generated by XDoclet > > import test.interfaces.Person; > > import test.interfaces.PersonData; > > > > /** > > * This is a person bean. It is an example of how to use the > XDoclet tags > > * > > * @ejb:bean > > * type="CMP" > > * cmp-version="2.x" > > * name="Person" > > * jndi-name="ejb/Person" > > * local-jndi-name="ejb/PersonLocal" > > * view-type="remote" > > * @ejb:finder > > * signature="Collection findAll()" > > * transaction-type="NotSupported" > > * query="SELECT OBJECT(p) FROM Person p WHERE p.id IS NOT NULL" > > * @ejb:transaction type="NotSupported" > > * > > * @jboss:table-name "person" > > * @jboss:create-table "true" > > * @jboss:remove-table "true" > > * @jboss:tuned-updates "true" > > * @jboss:read-only "false" > > * > > * @weblogic:table-name PERSON > > * @weblogic:data-source-name xdoclet.database > > > > > > The generated weblogic-cmp-rdbms-jar.xml: > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <!DOCTYPE weblogic-rdbms-jar PUBLIC "-//BEA Systems, Inc.//DTD > WebLogic 6.0.0 EJB RDBMS Persistence//EN" "" > target="l">http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20- > persistence-600.dtd"> > > > > <weblogic-rdbms-jar> > > <weblogic-rdbms-bean> > > <ejb-name>Person</ejb-name> > > <data-source-name>xdoclet.samples</data-source-name> > > <table-name>PERSON</table-name> > > <field-map> > > <cmp-field>name</cmp-field> > > <dbms-column>name</dbms-column> > > </field-map> > > <field-map> > > <cmp-field>firstName</cmp-field> > > <dbms-column>first_name</dbms-column> > > </field-map> > > <field-map> > > <cmp-field>phone</cmp-field> > > <dbms-column>phone</dbms-column> > > </field-map> > > <field-map> > > <cmp-field>fax</cmp-field> > > <dbms-column>fax</dbms-column> > > </field-map> > > <field-map> > > <cmp-field>id</cmp-field> > > <dbms-column>id</dbms-column> > > </field-map> > > > > <weblogic-query> > > <query-method> > > <method-name>findAll</method-name> > > <method-params> > > </method-params> > > </query-method> > > <weblogic-ql>SELECT OBJECT(p) FROM Person p WHERE p.id IS > NOT NULL</weblogic-ql> > > </weblogic-query> > > </weblogic-rdbms-bean> > > > > <create-default-dbms-tables>False</create-default-dbms-tables> > > > > </weblogic-rdbms-jar> > > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
