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

mongo-jackson-mapper in an OSGi environment #30

Open
sandermak opened this issue Jul 2, 2013 · 0 comments
Open

mongo-jackson-mapper in an OSGi environment #30

sandermak opened this issue Jul 2, 2013 · 0 comments

Comments

@sandermak
Copy link

Two things:

  1. There is a maven-bundle-plugin configured, but the resulting JAR after a mvn clean install has the auto-generated plexus-archiver manifest rather than the manifest generated by the maven-bundle-plugin.
  2. For some use-cases, I need to manually convert my value object into a JSON object, see [1]. Since BsonObjectGenerator is currently not exported, I cannot do this. Therefore, the exported packages could be extended.

I created a pull request containing solutions for both these issues. It might be better to move the net.vz.mongodb.jackson.internal.object classes to a non-internal package and expose, rather than exposing the package directly as I did in my pull request.

[1] example:

JacksonDBCollection<JsonOutcomeResult, Object> outcomes = ...
BsonObjectGenerator bsonObjectGenerator = new BsonObjectGenerator();
try {
   new ObjectMapper().writeValue(bsonObjectGenerator, jsonResult);
} catch (IOException e) {
   throw new RuntimeException(e);
}
        outcomes.update(new BasicDBObject("testState.sessionKey", sessionKey), bsonObjectGenerator.getDBObject());
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

Successfully merging a pull request may close this issue.

1 participant