Hi Vish, I don't see any reason for preventing you of doing that. BMP vs CMP is a question of implementation, while CMR fields refer to a component interface, where the distinction BMP vs CMP doesn't exist. Moreover, BMP and CMP entity beans are compatible at the implementation level too : same interface implemented, same callbacks (even the ejbCreate() BTW). Regards, Phil.
Howdy -- unfortunately, you cannot have a CMR relationship with a BMP bean... a CMR relationship means demands that *both* sides of the relationship are managed by the Container, so there's just no way you can do it. Although as Phillipe said, a CMR field is the component interface of an entity bean, and there's nothing in that interface that explicitly makes it a CMP vs. BMP bean, Bean Law (i.e. the spec rules) insists that one bean can have a relationship only with other CMP beans. Unless the Container is "in charge" of both sides of the relationship (and it doesn't really matter if it is uni- or bi-directional), it would not be able to maintain referential integrity, or handle things like cascading deletes. So, just remember that CMR = Container-Managed Relationship and Container-Managed Relationship means you MUST use Container-Managed Persistence on BOTH sides of the relationship. Both partners must use CMP. The Container is a control freak Now, that doesn't mean that you can't mix and match CMP and BMP beans in an app--only that they can't be in an official CMR relationship with one another. cheers, Kathy
posted 15 years ago
Thank you Kathy ! You just made one more demonstration of the big difference between knowing a bit and mastering... What's nice on this forum is that even when the exam is behind you, you still learn a lot ! Best, Phil.
posted 15 years ago
Thanks Kathy and Phillipe, Another good thing about this forum is, I can expect replies on a Sunday evening too...
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
ScroogeXHTML - small and flexible RTF to HTML converter library