Runtime Metadata MergingPage edited by Andrus AdamchikChanges (2)
Full ContentThis is a design document. As of 3.0 Cayenne doesn't include this feature. TODO: Will Need to adjust this design to match 3.1 realities of a simpler stack Multiple Deployment UnitsUsers can organize their persistent classes and object relational mapping files into separate deployment units, such as .jar files, .war files and class folders. Each deployment unit must have "cayenne.xml" descriptor and a set of related DataNode and DataMap XML files. At runtime Cayenne will merge mapping information from all deployment units into a single access stack using a set of rules described below. "cayenne.xml" Lookup RulesAs described in the previous deployment chapters, "cayenne.xml" is by default looked up in the root of each classpath location (such as top of a ".jar" file, a "WEB-INF/classes" folder, etc.), or in WEB-INF/ folder of a web application. Or it can be placed in a package or a subfolder per customization instructions. Merging Configuration from Multiple Deployment UnitsIf multiple deployment units contain "cayenne.xml" descriptors in the default or custom locations above, all descriptors will be merged together. Cayenne will do merging on its own using a set of default rules. Most of the merging behavior can be further customized by the user. The following merge rules are applied:
MergeContext context = ...
context.mergeDomainAs("unit1", "domain1", "myAppDomain");
MergeContext context = ...
context.setDefaultNode("unit1", "domain1", "myNode");
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Cayenne > Runtime Metadata Merging confluence
- [CONF] Apache Cayenne > Runtime Metadata Merging confluence
- [CONF] Apache Cayenne > Runtime Metadata Merging confluence
