Content deleted Content added
m change source to syntaxhighlight |
m Task 18 (cosmetic): eval 2 templates: del empty params (4×); hyphenate params (1×); |
||
Line 1:
'''Composite entity''' is a [[Java Platform, Enterprise Edition|Java EE]] [[Software design pattern]] and it is used to model, represent, and manage a set of interrelated persistent objects rather than representing them as individual fine-grained entity beans, and also a composite entity bean represents a graph of objects.<ref name=":o_cjp">{{Cite web|url = http://www.oracle.com/technetwork/java/compositeentity-141992.html|title = Core J2EE Patterns - Composite Entity|access-date
==Structure==
Line 24:
* materializing all the data in a coarse-grained entity whenever it is accessed, is unacceptably expensive
* In [[Java (programming language)|Java]], implementation of the ejbStore() method needs to be smart enough to avoid issuing all the updates required to persist the entire state of the object, unless the data has changed in all the persistent objects.
Composite entity pattern can only be implemented using BMP or by adding more hand-coded persistence logic to container managed persistence (CMP) [[JavaBeans|beans]]. These both approaches reduce the maintainability.<ref name=":eojdad">{{Cite book|title = Expert One-on-One J2EE Design and Development|last = Johnson|first = R. |publisher = Wiley Publishing, Inc|year = 2003|___location = Indianapolis
==Sample code==
|