Forums Register Login

EJBs modelling question

+Pie Number of slices to send: Send
Hi,
this might not be the best forum to post this question, but i think only j2ee developers could answer my question correctly.
I`m building an j2ee e-commerce app, but i`m having some dificults to model it (majority of the books don`t take care of this aspect)
Basically, i`d like to know wich option is better for modeling the EJBs and DB (suppose i`m using only CMPs, actually this doesn`t matter):
A - I could have one CMP EJB for each table to represent the persistence,
hava one Session EJB asscociated with that CMP EJB to represent the
access to it and a few Session EJBs to represent a "global" access to
diferent business logics of the app.
B - I could only hava the CMP EJBs for eache table and don not use the
intermediate Session EJBs, only a few Session EJBs to represent what i
called the global access.
C - Any onther sugestion, links, or books you could recomentd me???
Thanks in advance,
+Pie Number of slices to send: Send
I would suggest to create CMP's for each table and put some facade over it (one or two session beans) I don't see any reason to have here more than one bean.
In my understanding one can handle everything (also security issues). You can also check out this pattern
Olli
+Pie Number of slices to send: Send
I think you will be well off going through Ed Roman's book on EJB.
There is a chapter dedicated to a full fledged application that discusses the merits of CMP vs BMP, Session Vs Entity, performance issues with respect to some persistance approaches etc.
These chapters in the book are thought provoking and elaborate.
The book can be downloaded and viewed from theserverside.com(or can be bought).
+Pie Number of slices to send: Send
My point is:
Do i really need a facade exclusive for everyeach entity bean, or i facade a whole funcionality (in this case, a session bean over one, two or three CMPs)???
+Pie Number of slices to send: Send
You create a Facade for a recognizable business function. If that covers three Entity beans, that's fine.
Kyle
Let nothing stop you! Not even this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 417 times.
Similar Threads
desing question about composite entity pattern
ValueListHandler question
CMP with JBoss
Moving bean logic to regular java classes
lots of tables, what kind of mapping?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:45:37.