Reuse MappingJsonFactory across all sessions 43/86143/3
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Dec 2019 13:35:27 +0000 (14:35 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Dec 2019 17:41:38 +0000 (18:41 +0100)
commit6063cba8904ffbe05f4f963d640f79392878a2f7
tree08cbbf1d0614b9f5da12ded6004f7d485aa800fe
parent9ad72607d311b7c003611fa0a1cb6d2a15d15ae6
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