Here's my build.xml file for 'xdoclet' task to generate JBoss descriptor file:
| <jboss | version="3.2" | datasource="java:/storeDS" | datasourcemapping="mySQL" | destdir="dd/ejb" | > | In an (entity) bean: | * @ejb.bean | * name="Customer" | * type="CMP" | * view-type="local" | * primkey-field="customerKey" | * @ejb.persistence | * table-name="store_customer" | * @jboss.persistence | * create-table="no" | * remove-table="no" | * @jboss.unknown-pk | * class="java.lang.Integer" | * column-name="customerKey" | * jdbc-type="INTEGER" | * sql-type="INTEGER" | * auto-increment="true" | * @jboss.entity-command | * name="mysql-get-generated-keys" | * class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand" | Then, in $JBOSS_HOME/server/default/deploy/mysql-ds.xml: | <datasources> | <local-tx-datasource> | <jndi-name>storeDS</jndi-name> | <connection-url>jdbc:mysql://hostname:3306/storeDS</connection-url> | <driver-class>com.mysql.jdbc.Driver</driver-class> | <user-name>username</user-name> | <password>password</password> | </local-tx-datasource> | </datasources> | Hope this helps. Note I'm using 'auto_increment' for my primary key fields. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853683#3853683 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853683 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
