Jump to: navigation, search

EclipseLink/Development/ConfigProfiles

< EclipseLink‎ | Development
Revision as of 06:08, 19 November 2009 by Shaun.smith.oracle.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Config Profiles Feature

bug 293766 This page captures the functional requirements and design discussion for the addition of Configuration Profiles to EclipseLink

What is a Configuration Profile?

Example: META-INF/eclipselink-config.xml:

<eclipselink-profiles>
    <profile name="default">
        <!-- These properties will be added to System prior to session creation -->
        <system-property name="org.eclipse." value="" />
 
        <!-- These allow custom subclasses to be created to enable extended functionaliy -->
        <custom-type name="jpa.RepeatableWriteUnitOfWork">mypackage.MyRWUOW</custom-type>
        <custom-type name="jdbc.Connector">mypackage.OSGiJDBCConnector</custom-type>
 
        <!-- Platforms declarations and defaults-->
        <server-platform name="WebLogic11gR1-PS1">oracle.toplink.eclipselink.pltaform.weblogic.WebLogic11gR1-PS1</server-platform>
        <default-server-platform>WebLogic11gR1-PS1</default-server-platform>
    </profile>
</eclipselink-profiles>

Requirements

  • Add support for an EclipseLink specific configuration file that allows defaults and factory types to be customized using an XML file defined by a provided XSD with secitions for core, jpa, moxy, sdo, & dbws
  • Allow a profile to be specified during creation of a session
    • JPA: persistence unit property
    • ORM: Session constructors and sessions.xml
    • JAXB:
    • OXM:
    • SDO:
    • DBWS:
  • Default and user specified location of configuration file while allowing custom location
  • Support usage with bundles where some persistence services (JPA, MOXy, DBWS, SDO) are not necessarily on the classpath