Ektorp 1.1.1 Released

28 views
Skip to first unread message

henrik.lundgren

unread,
Mar 4, 2011, 2:27:50 PM3/4/11
to ektorp-discuss
Ektorp 1.1.1 has been released.

This is just a minor release fixing SSL-related problems.

Fixes
#94: Ektorp 1.1.0 not working on Android with SSL & other SSL problem
#96: org.ektorp.spring.HttpClientFactoryBean? doesn't support SSL-
related properties
#97: Ektorp gets Logger with runtime class as an argument.

Enjoy!

Joern Huxhorn

unread,
Mar 7, 2011, 1:49:26 PM3/7/11
to ektorp-...@googlegroups.com
Hi Henrik,

starting with 1.1.0, the c'tor of StdCouchDbConnector that previously accepted an ObjectMapper instance is now expecting an ObjectMapperFactory.
The documentation of the ObjectMapperFactory interface, however, is rather sparse.

I've implemented it like this at the moment:
private class XyzObjectMapperFactory
implements ObjectMapperFactory {

public ObjectMapper createObjectMapper() {
// See http://wiki.fasterxml.com/JacksonMixInAnnotations
ObjectMapper result = new ObjectMapper();
result.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false);
result.getSerializationConfig().addMixInAnnotations(Xyz.class, XyzMixIn.class);

result.getDeserializationConfig().addMixInAnnotations(Xyz.class, XyzMixIn.class);
return result;
}

public ObjectMapper createObjectMapper(CouchDbConnector connector) {
// OutOfDocumentationException
return createObjectMapper();
}
}

I've moved the creation of the previous ObjectMapper into the parameterless createObjectMapper() method.
I don't have any idea what the other method is supposed to do so I simply returned an instance of the same ObjectMapper.

What is the expected/correct way to implement that method?

Cheers,
Joern.

Henrik Lundgren

unread,
Mar 7, 2011, 11:16:25 PM3/7/11
to ektorp-...@googlegroups.com, ektorp-...@googlegroups.com
The objectmapperfactory was introduced because more configuration was needed for the new @DocumentReferences functionality in 1.1.0. If you dont plan to use that you will be fine with your implementation.

/H

Reply all
Reply to author
Forward
0 new messages