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
