Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OSGi compatible [moved] #208

Closed
jyemin opened this issue Apr 25, 2013 · 3 comments
Closed

Make OSGi compatible [moved] #208

jyemin opened this issue Apr 25, 2013 · 3 comments

Comments

@jyemin
Copy link
Contributor

jyemin commented Apr 25, 2013

This is Issue 208 moved from a Google Code project.
Added by 2011-01-07T22:17:22.000Z by atcomp...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Enhancement, Priority-Low, Milestone-Release0.99.1

Original description

The mongo-java-driver is distributed with OSGi headers, but it takes some hurdle jumping to get Morphia working alongside it as an OSGi bundle.  It would be helpful if Morphia was more OSGi friendly.  I think this could be accomplished with only a few changes:

1. Add OSGi headers to the Morphia .jar using bnd or maven-bundle-plugin

2. Provide a way to indicate what ClassLoader should be used to instantiate new objects.  Each OSGi bundle has it's own ClassLoader, so a bundle-ized Morphia can't access classes from other bundles by the Thread.currentThread().getContextClassLoader() method.  Morphia could either determine the ClassLoader to use from the Class itself (if known) or by allowing it to be provided explicitly by the user when mapping packages.
@jyemin jyemin closed this as completed Apr 25, 2013
@ymamakis
Copy link

Hi,
I would like to ask the status of this ticket whether it is indeed closed.
There had been a patch supplied:

https://code.google.com/p/morphia/issues/attachmentText?id=208&aid=4951170649807612032&name=morphia-208-patch.diff&token=LnGjyhO8YFQ7fZDz5Sm-UP9ljYo%3A1372238566785

to enable Morphia to work within an OSGi context using custom classloading on an application level.
So the question is since, I do not see any changes in this context, has it been made OSGi compatible?

@evanchooly
Copy link
Member

We're trying to clean up questions like this. Is it possible to get a test case from you to show any problems? I'll take a look when I can either way.

@evanchooly evanchooly reopened this Jun 26, 2013
@evanchooly
Copy link
Member

Tracking this via #405

fwautobuild pushed a commit to fwHub/morphia that referenced this issue Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants