mardi, juin 23, 2009

OSGi DevCon Europe: Persistence

OSGi Persistence


Java Persistence standards

JPA
OXM: JAXB 2.X
EDIT (see comments)
OXM: SDO 2.1.1 JSR 235

Eclipse Link

JPA, MOXy (Object-XML), EIS, SDO, DBWS (XML-relational...Oracle :p)
Currently JPA 1.0 compatible, and working on 2.0

MOXy

Complete Object-XML mapping
Provides external mapping file! NICE!!! Never understood why they didn't give that option in JAXB...

EclipseLink available as OSGi bundles

Supports usage of standard APIs (Persistence.createEntity, JAXBContext.newInstance(), commonj.sdo.HelperProvider)
Supports modular packaging
Decouples application from provider (Through JPA tag)

Challenges for OSGi and JPA

Bootstrap in JPA scans the classpath
Provider needs access to domain model classes
Needs access to JDBC driver (addressed RFC 122)

Challenges for OSGi and JAXB

Spec SPI does not support registration of providers
Provider needs access to domain model classes
Though supports passing domain model classloader

Challenges for OSGi and SDO

Spec hardwires everything so it doesn't support custom providers

JPA 2.0 will include dynamic resolution.

1 commentaires:

kg a dit…

A subtle but not insignificant correction. JSR 235 provides the SDO 2.1.1 specification. The 2.1 SDO spec was created by the OSOA group.