Hi Julien, My suggested Approach: 1. First of all decide do you require EJB or not? if yes then.. You have 3 options for data access in j2ee. 1. CMP 2. BMP 3. Pure JDBC calls.
CMP: CMP entity beans can span only a single database table. With the introduction of the EJB 2.0 standard, you can use CMR fields (Container Managed Relationships). A CMR allows a CMP entity bean to maintain a "relationship" to other CMP beans as long as these relationships are represented in the underlying database as foreign keys. CMR allows also relation tables (such as your establishments_qualifiers table). The CMP approach gives you 3 entity beans (establishments, categories and visitors_comments) with 2 relationships (one with a relation table). BMP : With BMP, you can have a single entity bean to span your tables. But all the persistence will be managed by you. This is a tiresome, repetitive, and error-prone job, and it often sacrifices portability for the sake of performance. JDBC calls : Write a session bean with pure JDBC calls allows you also to have a single bean span to your tables. Same opinion as BMP's. Another solution will be using 3 CMP entity beans (as described above) , and one BMP entity bean which fields are the 3 other beans. In this case, the persistence will be managed by the container and you can use your tables through a single BMP bean. Good luck View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832233#3832233 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832233 ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
