Reuse MappingJsonFactory across all sessions 44/86144/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Dec 2019 13:35:27 +0000 (14:35 +0100)
committerStephen Kitt <skitt@redhat.com>
Wed, 4 Dec 2019 09:20:32 +0000 (09:20 +0000)
commit171549eec632707693bc07287d9b655508f4e629
tree1209f59e0153fd26bdfe327c903864d84ee63c53
parentf38993d13d161f82b938a69fdf83d06e8dd8fa77
Reuse MappingJsonFactory across all sessions

Heap dump analysis shows we are keeping a per-connection
MappingJsonFactory, which also means we have an ObjectMapper
associated with each connection.

Both MappingJsonFactory and ObjectMapper are documented as
thread-safe and noted to be best shared. Make sure we use a single
instance across all connections.

Change-Id: Ic13ea538eecba9a08d4dba9ac617f2f29abeaba7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java