Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] osgi persistence.xml hack

Cool, ya we're working with the trunk now. I'll file a bug on this &
any future ones now.

Thanks

On Fri, May 9, 2008 at 9:42 AM, Shaun Smith <shaun.smith@xxxxxxxxxx> wrote:
> Hi Tim,
>
>    Thanks for the pointer!  As you know the OSGi Proof of Concept was not
> subjected to our regression test suites nor was it tested by myself
> extensively.  I just wanted to explore the issues around OSGi packaging and
> discover and file any show stopper bugs, which were primarily around
> classloader usage.
>
>    Now with the OSGi support in the trunk we'll be investing in OSGi
> tests--outside Ecilpse ;-).  If you're working with the trunk and having
> problems do file bugs in bugzilla so we can get them fixed.
>
>        Shaun
>
> 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
>
>
> --
>
>
>
> Shaun Smith | Principal Product Manager, TopLink | +1.905.502.3094
> Oracle Fusion Middleware
> 110 Matheson Boulevard West, Suite 100
> Mississauga, Ontario, Canada L5R 3P4
>
> _______________________________________________
> eclipselink-dev mailing list
> eclipselink-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
>
>



-- 
./tch


Back to the top