[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-dev] osgi persistence.xml hack
|
Hi Tim,
We are now creating plugins as part of our build. I was unable to recreate
the issue you mention below with those plug-ins. I am wondering if you still
get it with those plugins.
The most recent plugins are published with our nightly builds. Just look
for: eclipselink-plugins-incubation-20080514.zip for last night's build at:
http://www.eclipse.org/eclipselink/downloads/nightly.php
Note: There is an issue with the ant plug-in found in the zip file right now, so
you will likely have to export that file from our Eclispe PDE project for now.
-Tom
Tim Hollosy wrote:
HI devs!
After mucking around trying to get OSGi EclipseLink to work _outside_
of eclipse (an exported eclipse product), We've finally gotten it to
work:
In org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor
in the processPersistenceArchive method
Instead of getting the XML stream from the "Archive" class like:
InputStream pxmlStream = archive.getEntry("META-INF/persistence.xml");
-- which doesn't work for some reason.
You can instead use the classLoader's getResourceAsStream method like this:
InputStream pxmlStream = loader.getResourceAsStream("META-INF/persistence.xml");
I'm not exactly sure why the Archive class stuff doesn't work outside
of eclipse, since the getResources() call on the classLoader seems to
work fine, but I thought someone might be interested in this work
around.
As an aside -- I think you might want to look at testing outside of
eclipse, since apparently osgi in and outside of eclipse are two
different animals.
Thanks!
Tim
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev