Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.

Commit 07eb17b

Browse files
committed
disabled JMX on connection pool
1 parent c95ec86 commit 07eb17b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/redislabs/springredisearch/RediSearchConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ StatefulRediSearchConnection<String, String> connection(RediSearchClient rediSea
6565
@Bean(name = "rediSearchConnectionPool", destroyMethod = "close")
6666
GenericObjectPool<StatefulRediSearchConnection<String, String>> rediSearchConnectionPool(
6767
RediSearchClient rediSearchClient) {
68+
GenericObjectPoolConfig<StatefulRediSearchConnection<String, String>> config = new GenericObjectPoolConfig<StatefulRediSearchConnection<String, String>>();
69+
config.setJmxEnabled(false);
6870
GenericObjectPool<StatefulRediSearchConnection<String, String>> pool = ConnectionPoolSupport
69-
.createGenericObjectPool(() -> rediSearchClient.connect(),
70-
new GenericObjectPoolConfig<StatefulRediSearchConnection<String, String>>());
71+
.createGenericObjectPool(() -> rediSearchClient.connect(), config);
7172
Pool poolProps = pool();
7273
if (poolProps != null) {
7374
pool.setMaxTotal(poolProps.getMaxActive());

0 commit comments

Comments
 (0)