Hello Andreas,
For SDO 2.1/SDO 2.1.1 you will need to use the non-default
HelperContext in an OSGi environment. In EclipseLink this can be done
using one of the following calls:
- HelperContext hc = new
org.eclipse.persistence.sdo.SDOHelperContext();
- HelperContext hc = new
org.eclipse.persistence.sdo.SDOHelperContext(aClassLoader); // If you
require a ClassLoader to load your generated interface classes (if any).
-Blaise
Blaise Doughan
Team Lead, EclipseLink OXM/JAXB/SDO
Andreas Kollegger wrote:
Hi,
Has anyone gotten SDO to work in an OSGi environment like Felix? I'm
trying simple things like...
HelperContext scope = HelperProvider.getDefaultContext();
... which falls into a rabbit hole of trying to resolve classes that
aren't imported/exported. It looks to me like the
org.eclipse.persistence.sdo bundle and the commonj.sdo plugin in trunk
both need to be updated.
Looking at the reference implementation for commonj.sdo, it could be
augmented with an OSGi activator which uses a service tracker to look
for installed implementations. Similarly, org.eclipse.persistence.sdo
could have an activator to register its implementations. Client bundles
could either use the standard commonj.sdo static instance references or
instead get the OSGi service references. Does that sound reasonable?
-Andreas
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
|