From 85816be96716b46fd6d622601764af8a9b7f7339 Mon Sep 17 00:00:00 2001 From: Vlastimil Elias Date: Wed, 22 Jul 2015 13:35:56 +0200 Subject: [PATCH] KEYCLOAK-1542 - code cleanup ahead of PR --- .../jpa/DefaultJpaConnectionProviderFactory.java | 6 ------ .../mongo/DefaultMongoConnectionFactoryProvider.java | 6 ------ .../org/keycloak/provider/ProviderOperationalInfo.java | 8 -------- .../services/resources/admin/ServerInfoAdminResource.java | 1 - 4 files changed, 21 deletions(-) diff --git a/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java b/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java index 36f3c09cce..1795cd13c5 100755 --- a/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java +++ b/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java @@ -231,12 +231,6 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide public String getDatabaseProduct() { return databaseProduct; } - - @Override - public boolean isOk() { - // TODO KEYCLOAK-1578 - implement operational monitoring of JPA DB connection - return true; - } } } diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java index c8d1cbaed4..248b880be6 100755 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java @@ -212,12 +212,6 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro public String driverVersion; public String user; - @Override - public boolean isOk() { - // TODO KEYCLOAK-1578 - implement operational monitoring of Mongo DB connection - return true; - } - public String getAddress() { return address; } diff --git a/model/api/src/main/java/org/keycloak/provider/ProviderOperationalInfo.java b/model/api/src/main/java/org/keycloak/provider/ProviderOperationalInfo.java index ca3e8a6849..e37544d276 100644 --- a/model/api/src/main/java/org/keycloak/provider/ProviderOperationalInfo.java +++ b/model/api/src/main/java/org/keycloak/provider/ProviderOperationalInfo.java @@ -11,12 +11,4 @@ import java.io.Serializable; */ public interface ProviderOperationalInfo extends Serializable { - /** - * Return true if provider is OK from operation point of view. It means it is able to perform necessary work. - * It can return false for example if remote DB of JPA provider is not available, or LDAP server of LDAP based user federation provider is not available. - * - * @return true if provider is OK to perform his operation. - */ - boolean isOk(); - } diff --git a/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java index 91610db0c4..dbb0ff0c8f 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java @@ -19,7 +19,6 @@ import org.keycloak.Version; import org.keycloak.broker.provider.IdentityProvider; import org.keycloak.broker.provider.IdentityProviderFactory; import org.keycloak.connections.jpa.JpaConnectionProvider; -import org.keycloak.connections.mongo.DefaultMongoConnectionFactoryProvider.MongoDbInfo; import org.keycloak.connections.mongo.MongoConnectionProvider; import org.keycloak.events.EventListenerProvider; import org.keycloak.events.EventType;