I use XDoclet to generate those relevant DD for the entity beans. Have a look
at http://xdoclet.sourceforge.net/xdoclet/index.html
Look at @ejb and @jboss tag if you're using JBoss as the app server.
Sample usage will be (at the bean implementation class):
Not all tags needed is in this sample
/**
* @ejb.bean name = "AnEntity"
* type = "CMP"
* display-name = "AnEntity"
* description = "AnEntity EJB"
* view-type = "remote"
* jndi-name = "ejb/AnEntity"
* primkey-field = "id"
*
* @jboss.cmp-field field-name="id" column-name="Id"
* @jboss.cmp-field field-name="column2" column-name="column2"
*
* @jboss.persistence
* datasource="java:/PostgresPool"
* datasource-mapping="PostgreSQL"
* table-name="table_name"
*/
public abstract class AnEntity implements EntityBean {
...
...
}
[Note] The '@jboss.persistence' is where you declared your bean to map to which
datasource and table.
Hope this help.
Regards,
bb
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882317#3882317
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882317
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user