Martin, It might be useful for you to use a J2EE Design Patterns framework that helps implement an optimal, coarse-grained Session Facade architecture with lightweight persistent entity classes (a great EJB 1.1-2.0 compatible option before EJB 2.0 local interfaces begin to be more widely supported/adopted).
Having to write lots of raw JDBC DAOImpl code for your "Fast-Lane Reader" data access objects and having to write code to do page-by-page iteration, and having to write code to serve as an MVC model, etc. can all be made easier by standing on the shoulders of a J2EE framework that helps implements the design patterns for you. I gave a talk at this years JavaOne 2001 conference on how you can much more easily build J2EE applications (in my case I showed how to rebuild the Java Pet Store demo standing on the shoulders of one of these J2EE frameworks). These kinds of frameworks can work on multiple J2EE app servers and work with multiple backend databases too. http://servlet.java.sun.com/javaone/conf/sessions/2197/0-sf2001.jsp <vendor> Oracle's "Business Components for Java" J2EE framework is one offering in this area. </vendor> There are likely others to consider, too. _____________________________________________________________________ Steve Muench - Developer, Product Manager, XML Evangelist, Author "Building Oracle XML Applications" - www.oreilly.com/catalog/orxmlapp ----- Original Message ----- From: "Martin Welch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 2:53 PM Subject: Re: Coarse vs Fine Design Question | Krishnan, | | You are right. I am thinking about EJB 1.1, at least for the moment. | | atm, I'm trying to understand how j2ee developers use ejbs in the real | world. I've been on a course, I've read books and articles but it's not | until you start developing a solution do you realise how little you know :) | | For someone unfamiliar with so many java related issues getting one CMP bean | to work with WebLogic 5.1 and JBoss was, well, an experience! I've now | written a few servlets and got a small web site up and running so I'm | getting there but there's still so much to learn. | | Stumbling on the Sun pattern catalog has been an eye opener in that it's | answered many questions. Take the Value List Handler as an example. Up to | the point I read about this I believed that to display a list I'd have a | stateless session bean return a list of CMP beans. I really struggled with | the concept of creating all these beans - paricularly with my ms developer | background. | | I need to understand this stuff in a vendor-neutral way. Introducing the | idea that I can approach things in different ways depending on the app | server I use worries me even more :) | | Cheers! | | Martin | | -----Original Message----- | From: Krishnan Subramanian [mailto:[EMAIL PROTECTED]] | Sent: 30 October 2001 13:24 | To: Martin Welch; [EMAIL PROTECTED] | Subject: RE: Coarse vs Fine Design Question | | | Hi Martin, | | I assume you want to use EJB 1.1 CMP since there are a plethora | of j2ee 1.2 certified application servers around. But the EJB 1.1 | was relatively weak in the sense it did not specify how (or even | if) an EJB server vendor provided features to define & manage | relationships between (entity) beans. The EJB 2.0 specification | does set this straight - but it is going to be some time before | vendors are certified ejb 2.0 compliant. (There are vendors that | are supporting parts of the ejb 2.0 specification already) | | However with current 1.1 (certified) implementations on the market, | I would suggest you take a look at different vendor offerings to | see if (and then how) they implement this with CMP. Some might | even 'delegate' this to a third party tool like TopLink. | | I would suggest (it is a suggestion only) that you take a look | at the Borland AppServer as it has some strong O/R mapping features | built into the CMP engine itself. | | See section "EJB Entity Beans" in the document "Features and Benefits" | (PDF) at http://www.borland.com/appserver/ | | The product itself is available as a trial download and there are some | examples & documentation that illustrate how relationships work | with our product. | | -krish | | To: [EMAIL PROTECTED] | Subject: Coarse vs Fine Design Question | | | I'm a relative newbie to J2EE and I'm in the process of developing an | application using this technology. My intent, from the | beginning, is to apply best practices and Sun's pattern catalog and the | excellent Core J2EE Patterns seems to have this pretty much | covered. | The problem I'm having is finding simple examples that demonstrate how to | apply this stuff. Or put it another way: my brain seems | stuffed with theory by I don't know where to start in practice. | What, for example, is the best way to model an invoice where there is a | many-to-one relationship of invoice lines to header? | Should I model this as a CMP bean for header, a CMP bean for lines and an | Invoice stateless session bean that manages the CMP beans? | Should I model this as a single Invoice BMP bean? This is my interpretation | of the Aggregate Entity model pattern. Is my | interpretation correct? | Should I carry on reading books for a while longer because these questions | get answered by every book on ejb's anyway? :) | Is this the right list to pose questions like this? | Thanks for any help. | Martin | =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
