Package org.keycloak.connections.jpa
Class DefaultJpaConnectionProviderFactory
java.lang.Object
org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory
- All Implemented Interfaces:
JpaConnectionProviderFactory
,ProviderFactory<JpaConnectionProvider>
,ServerInfoAwareProviderFactory
public class DefaultJpaConnectionProviderFactory
extends Object
implements JpaConnectionProviderFactory, ServerInfoAwareProviderFactory
- Author:
- Stian Thorgersen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkJtaEnabled
(KeycloakSessionFactory factory) void
close()
This is called when the server shuts down.create
(KeycloakSession session) protected void
export
(Connection connection, String schema, File databaseUpdateFile, KeycloakSession session, JpaUpdaterProvider updater) getId()
Return actual info about the provider.void
init
(Config.Scope config) Only called once when the factory is first created.void
postInit
(KeycloakSessionFactory factory) Called after all provider factories have been initializedprotected void
prepareOperationalInfo
(Connection connection) protected void
startGlobalStats
(KeycloakSession session, int globalStatsIntervalSecs) protected void
update
(Connection connection, String schema, KeycloakSession session, JpaUpdaterProvider updater) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn, getConfigMetadata, order
-
Constructor Details
-
DefaultJpaConnectionProviderFactory
public DefaultJpaConnectionProviderFactory()
-
-
Method Details
-
create
- Specified by:
create
in interfaceProviderFactory<JpaConnectionProvider>
-
close
public void close()Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceProviderFactory<JpaConnectionProvider>
-
getId
- Specified by:
getId
in interfaceProviderFactory<JpaConnectionProvider>
-
init
Description copied from interface:ProviderFactory
Only called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
init
in interfaceProviderFactory<JpaConnectionProvider>
-
postInit
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<JpaConnectionProvider>
-
checkJtaEnabled
-
prepareOperationalInfo
-
startGlobalStats
-
update
protected void update(Connection connection, String schema, KeycloakSession session, JpaUpdaterProvider updater) -
export
protected void export(Connection connection, String schema, File databaseUpdateFile, KeycloakSession session, JpaUpdaterProvider updater) -
getConnection
- Specified by:
getConnection
in interfaceJpaConnectionProviderFactory
-
getSchema
- Specified by:
getSchema
in interfaceJpaConnectionProviderFactory
-
getOperationalInfo
Description copied from interface:ServerInfoAwareProviderFactory
Return actual info about the provider. This info contains information about provider's configuration and operational conditions (eg. errors in connection to remote systems etc) which is shown on "Server Info" page then.- Specified by:
getOperationalInfo
in interfaceServerInfoAwareProviderFactory
- Returns:
- Map with keys describing value and relevant values itself
-