public class EnvironmentDrivenDatabaseConfigurationListener extends Object implements DatabaseConfigurationListener
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_POOL_SIZE |
static String |
HIBERNATE_POOL_SIZE |
static String |
JDBC_DIALECT_PROPERTY |
static String |
JDBC_DRIVER_PROPERTY |
static String |
JDBC_PASSWORD_PROPERTY |
static String |
JDBC_URL_PROPERTY |
static String |
JDBC_USER_PROPERTY |
Constructor and Description |
---|
EnvironmentDrivenDatabaseConfigurationListener() |
Modifier and Type | Method and Description |
---|---|
int |
getValidPoolSize() |
void |
handleJNDIDataSource(String hibernateDialect)
Handles the Hibernate dialect selected when configuring a JNDI database connection.
|
boolean |
isConfigurationValid() |
boolean |
isPoolSizeConfigurationValid() |
void |
updateApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
Handles database configuration stored in
ApplicationConfiguration , should be called after the configuration
is loaded, but before it's used by the application. |
void |
updateDatabaseDetails(com.atlassian.config.db.DatabaseDetails databaseDetails)
Handles database configuration stored in
DatabaseDetails , passed after completing database setup. |
boolean |
willOverrideDatabaseDetails() |
public static final String JDBC_URL_PROPERTY
public static final String JDBC_USER_PROPERTY
public static final String JDBC_PASSWORD_PROPERTY
public static final String JDBC_DRIVER_PROPERTY
public static final String JDBC_DIALECT_PROPERTY
public static final String HIBERNATE_POOL_SIZE
public static final int DEFAULT_POOL_SIZE
public EnvironmentDrivenDatabaseConfigurationListener()
public void updateApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
DatabaseConfigurationListener
ApplicationConfiguration
, should be called after the configuration
is loaded, but before it's used by the application.updateApplicationConfig
in interface DatabaseConfigurationListener
applicationConfig
- the freshly loaded application configurationpublic void updateDatabaseDetails(com.atlassian.config.db.DatabaseDetails databaseDetails)
DatabaseConfigurationListener
DatabaseDetails
, passed after completing database setup.updateDatabaseDetails
in interface DatabaseConfigurationListener
databaseDetails
- the details used to complete database setuppublic void handleJNDIDataSource(String hibernateDialect)
DatabaseConfigurationListener
handleJNDIDataSource
in interface DatabaseConfigurationListener
hibernateDialect
- the Hibernate dialectpublic boolean willOverrideDatabaseDetails()
willOverrideDatabaseDetails
in interface DatabaseConfigurationListener
DatabaseDetails
.public boolean isConfigurationValid()
public boolean isPoolSizeConfigurationValid()
public int getValidPoolSize()
Copyright © 2020 Atlassian. All rights reserved.