Skip to content

mongo-jackson-mapper in an OSGi environment #30

@sandermak

Description

@sandermak

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());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions