-
Notifications
You must be signed in to change notification settings - Fork 113
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
MongoJackModule can't be configured with a custom ObjectMapper in OSGi #202
Comments
or probably some other programmatic way provided by the JacksonMongoCollectionBuilder class itself where we just configure the MongoJackModule once with the custom ObjectMapper as we don't need to configure it per collection. |
Workaround till mongojack/mongojack#202 is resolved.
Workaround till mongojack/mongojack#202 is resolved.
Workaround till mongojack/mongojack#202 is resolved.
Would adding a static helper in org.mongojack that did the configuration work? I don't want to move the class and break backward compatibility. e.g., something like:
|
I completely agree on maintaining the backward compatibility. Yes, a helper in exported package will work and org.mongojack is exported as per the manifest headers. |
Since MongoJackModule is in internal package therefore it is not accessible to register the custom ObjectMapper.
Basically this doesn't work in OSGi
MongoJackModule.configure(myObjectMapper);
One option would be to expose the internal package as well without any code change and this will be fully backward compatible. However, it breaks strong encapsulation which OSGi provides.
Fix/workaround - We just need to add one more package in maven-bundle-plugin
org.mongojack,org.mongojack.internal
if it is ok then I could provide a PR.
Thanks,
Rakesh
The text was updated successfully, but these errors were encountered: