200 likes | 350 Views
EclipseLink Project Component Overview. Peter Krogh, Blaise Doughan, Mike Norman. Components. Foundation (core) Includes core functionality with native ORM, OXM, and EIS support JPA JPA 2.0 Reference Implementation MOXy JAXB 2.1 Compliant – 2.2 Compliant for EclipseLink 2.1 SDO
E N D
EclipseLink ProjectComponent Overview Peter Krogh, Blaise Doughan, Mike Norman
Components • Foundation (core) • Includes core functionality with native ORM, OXM, and EIS support • JPA • JPA 2.0 Reference Implementation • MOXy • JAXB 2.1 Compliant – 2.2 Compliant for EclipseLink 2.1 • SDO • SDO 2.1.1 RI • DBWS • Utils • Workbench, Package Rename, DBWS Builder • Documentation • Examples • Incubator
Spring WebContainer Eclipse Persistence Services “EclipseLink” Java SE Java EE OSGi Eclipse Persistence Services Project (EclipseLink) JPA MOXy EIS SDO DBWS XML Data Legacy Systems Databases
Foundation Component • Bundles • org.eclipse.persistence.core • Fragments • org.eclipse.persistence.oracle • extending org.eclipse.persistence.core • Testing • eclipselink.core.test • eclipselink.extension.oracle.test • /targets • target.oracle - for Eclipse IDE to access optional Oracle JDBC • /plugins • org.eclipse.persistence.oracle.jar • org.eclipse.persistence.oracle.source.jar
JPA Component • Bundles • org.eclipse.persistence.jpa • Fragments • org.eclipse.persistence.jpa.equinox • extending org.eclipse.persistence.jpa • org.eclipse.persistence.jpa.weaving • extending org.eclipse.osgi • Testing • eclipselink.jpa.test • eclipselink.jpa.spring.test • /plugins • javax.persistence – 2.0 preview – current version: 1.99.5
MOXy Component • Bundles • org.eclipse.persistence.moxy • org.eclipse.persistence.moxy.dynamic • Testing • eclipselink.test.moxy • /bin • jaxb-compiler.cmd/sh • /plugins (only required for Java SE 5) • javax.xml.bind_2.2.0.v201003241715.jar (with source) • javax.xml.stream_1.0.1.v201001131653.jar • javax.mail_1.4.0.v200804091730.jar • javax.activation_1.1.0.v200906290531.jar
Customer id: int name: String address: Address Path Based Mapping The activity of ‘Mapping’ is the process of connecting objects/attributes to XML types/nodes by XPath. <customer id=“…”> <name>…</name> <contact-info> <address> … </address> </contact-info> </customer> @id name/text() contact-info/address
: PersonalInfo : Customer : Customer firstName = “Jane” lastName = “Doe” firstName = “Jane” lastName = “Doe” Path Based Mapping Advantages Without – 1-to-1 Relationship Between Objects & XML <customer> <personal-info> <first-name>Jane</first-name> <last-name>Doe</last-name> </personal-info> </customer> With – Use Your Own Domain Objects <customer> <personal-info> <first-name>Jane</first-name> <last-name>Doe</last-name> </personal-info> </customer>
Multiple XML Representations Path based mapping breaks the 1-to-1 relationship between classes and XML elements found in every other binding platform. This allows objects to be mapped to different XML schemas useful for: • Supporting multiple versions of an XML document • Handling related XML data from multiple service providers
Mapping JPA Entities to XML DB JPA Entity JAXB XML • MOXy Mapping Extensions for JPA Entities: • Bi-Directional Relationship Support • Composite Key Support • Embedded Key Class Support • Support for Indirection (Lazy Loading) • Support for java.sql Types • Support for non-String IDs
SDO Component • Bundles • org.eclipse.persistence.sdo • Testing • eclipselink.sdo.test • eclipselink.sdo.test.server.wls • /bin • sdo-compiler.cmd/sh • sdo-jaxb-compiler.cmd/sh • /plugins • commonj.sdo_2.1.1.v200905221342.jar • commonj.sdo.source_2.1.1.v200905221342.zip
Data Access Service Strategy Java EE DB JPA Entity JAXB XML • JPA is leveraged as the database access technology • Containment structure applied to entities using JAXB • SDO DataObjects wrap JPA entities Wrap SCA DataObject SDO XML
DBWS Component • Packages – NB: DBWS is not (yet) OSGi-ified! • Runtime: • o.e.p.dbws, o.e.p.internal.dbws, o.e.p.internal.xr, o.e.p.internal.xr.sxf • Design-time: • o.e.p.tools.dbws, o.e.p.platform.database.oracle.publisher • Testing • eclipselink.dbws.test, eclipselink.dbws.test.oracle, eclipselink.utils.dbws.test, eclipselink.utils.dbws.test.oracle • DBWS Builder • Java main command-line utility • Also programmatic API – allows integration with IDE • External S/W requirements • (design-time): WSDL4J; Servlet 2.4(+); tools.jar
DBWS – Why Database Web Services? Database Web Services take advantage of existing investment in relational database artifacts: Tables/Views Custom SQL SELECTs Stored Procedures; PL/SQL packages EclipseLink DBWS (since 1.1) provides simple and efficient access to these artifacts through JAX-WS Provider end-point Database-platform neutral, all leading vendors supports Metadata driven: design-time utility uses simple defaults to generate JAX-WS deployment artifacts Advanced developers can fully customize access to the database and mappings between relational artifacts and SOAP msg elements
DBWS Builder ORM OXM RDBMS DBWS config files Scan database schema Development artifacts Metadata artifacts DBWSBuilder DBWS Builder file
DBWS Runtime JAX-WS Client SOAP msgs JAX-WS Provider Endpoint • DBWS Metadata • DBWS config • EclipseLink Session config: ORM & OXM maps • JSR-109 WS Metadata • web.xml • XSD • WSDL • Provider Endpoint impl DBWSProvider.class EclipseLink DBWS Mapping Metadata Data Source Access Different Vendors’ Databases
DBWS Use Cases Create service from Table: Expose CRUD (Create/Read(findByPK,findAll)/Update/Delete) operations Create service from Custom SQL SELECT stmts Does not expose actual SQL Create service from Stored Procedures Support complex argument parameters (OraclePlatform) JDBC object and array types PL/SQL datatypes – records, collections
Utils Component • DBWS Builder • eclipselink.utils.dbws • eclipselink.utils.dbws.test • eclipselink.utils.dbws.test.oracle • eclipselink.utils.jaxb • eclipselink.utils.rename • eclipselink.utils.webclient • Workbench • eclipselink.utils.workbench • eclipselink.utils.workbench.lib • eclipselink.utils.workbench.test
Examples Component • Built and maintained by committers • http://wiki.eclipse.org/EclipseLink/Examples • http://wiki.eclipse.org/EclipseLink/Examples/JPA • Combination of how-to documents, simple downloadable examples, and more complete application tutorials • Examples exist within each branch of development
Documentation • Maintained on wiki • http://wiki.eclipse.org/EclipseLink/UserGuide • Converted from Oracle internal (Framemaker)