Hi Chris, I agree that there is no standard way to implement CMP. I'm not convinced that the spec should specify a standard way to accomplish this. This seems to me to be an area for product differentiation in the functionality dimension. The flexibility Tom didn't want to lose was not the ability to change application servers, but rather the ability to change datasources without impacting his entity bean code. I think a good CMP implementation, even if proprietary, could offer this kind of flexibility, arguably making it superior to BMP with regard to this one feature. On the other hand, it doesn't seem hard to implement a BMP framework that would allow you to change datasources without affecting the entity beans, so I could make the case that a good BMP implementation could offer this flexibility as well. In an exchange I had with Tom off the list, we discussed this further and I encouraged him, as I do everyone, to implement entity beans using BMP until better implementations of CMP are available. If an app server provided all of the complex mappings necessary to map a domain model to a relational database, I would not rule out CMP merely because it was proprietary and non-portable to other app servers. I would think that the most we could hope for from future specs would be a portable way of specifying the meta data for mapping the domain objects to a given dB schema. --Chip Chris Raber wrote: > Chip, > > I agree with your sentiment. However, there is no standard way for a CMP > implementation to provide the functionality you suggest (the spec doesn't > deal with this), so you are no better off using a CMP implementation than > using BMP and an OR tool. > > -Chris. > > > > The flexibility you gained came from using CMP. The fact that you had to > > hand-code the persistence of dependant objects came from using a poor > > implementation of CMP. Original Post: > > > > What i have been doing thus far is > > > adding the persistence code to the entity bean and let it control the > > > dependant object. Is this the right way of doing things? > > > > > > The thing that i don't like about that approach is that the Order bean > > has > > > the flexibility of having its data source changed without impact to the > > > component. If the component now contains hand coded persistance code, it > > > then become unportable. I would be very keen on knowing how is the best > > way > > > to approach this common problem. > > > > > > thanks in advance. > > > Tom
begin:vcard n:Wilson;Chip tel;fax:(214) 358-0353 tel;work:(214) 642-4559 x-mozilla-html:TRUE url:http://www.axyssolutions.com/ org:Axys Solutions adr:;;;Dallas;TX;; version:2.1 email;internet:[EMAIL PROTECTED] title:Application Architect note:Sun Certified Java Architect x-mozilla-cpt:;-25088 fn:Chip Wilson end:vcard
