Reuse MappingJsonFactory across all sessions 45/86145/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:22:26 +0000 (09:22 +0000)
commit4424150e65a7c2cbe61bc0e6affad9cfc6f70cbc
tree4dc0108698bf2b7d86e50e0b68db3a2d5ea1fef8
parent2e9ba8f8bc330bf3b606208057d4382561b446b5
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