"pego" wrote : | Im approaching to design the server "session side" of an application. | I've already done the "persistence side" using entity bean and it is quite complex (a lot of hierarchies and associations between entities). |
again, i'm in the same situation as you are :) i finished creating most of my entities and until now i used one session bean to persist all of my entities created or modified on the client side. As all my entities inherit from a @EmbeddableSuperclass BaseEntity, i just have one persist-method in my session bean : public BaseEntity persist(BaseEntity e), which returns the entity to the client (with the ID filled in) and one retrieve-method : public Collection getEntitiet(String EQL). It worked good for small "helper" entities, which basically are involved in no other operations than CRUD operations, and are used in SPP fields. But now i'm moving on to "bigger" entities like Customers and Articles i find that i need some more specific persisting operations. So i make specific session beans for these entities. I don't think you can make a hierarchy of session beans. So i think i use a mixture between your idea (mapping every entity bean to session bean,which seems like a good intuitive option, but may leave you with to many session beans) and the general idea (one session bean handles all entity operations, which is with any complex system impossible). I'm no expert in EJB or J2EE, this is my first application i'm developping, so these are no facts, just my thoughts. Any comments are welcome! @silviu : are you referring to the design of cascade and lazy settings for relations ? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911639#3911639 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3911639 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user