Skip to content

Commit

Permalink
Review Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jujoramos committed Oct 9, 2023
1 parent d9b50d9 commit adeb932
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ private StateManagerConfig() {
public static final String TYPE = "type";

// Database Configuration Values
public static final class DataBase {
public static final class Database {
public static final String DB_PROPERTIES = "database";
public static final String JDBC_USER = DB_PROPERTIES + ".user";
public static final String JDBC_PASS = DB_PROPERTIES + ".pass";

public static final String JDBC_URL = DB_PROPERTIES + ".jdbc.url";
public static final String JDBC_DRIVER = DB_PROPERTIES + ".jdbc.driver";
public static final String JDBC_DRIVER_DIRECTORY = DB_PROPERTIES + ".jdbc.directory";
public static final String JDBC_PERSISTENCE_UNIT_NAME = DB_PROPERTIES + ".jdbc.persistenceUnitName";
public static final String JDBC_POOL_MAX_SIZE = DB_PROPERTIES + ".pool.maxSize";
public static final String JDBC_POOL_MIN_SIZE = DB_PROPERTIES + ".pool.minSize";
public static final String JDBC_POOL_IDLE_TIMEOUT_SECONDS = DB_PROPERTIES + ".pool.idleTimeoutSeconds";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/state.manager/1.0/corda.state.manager.json",
"$id": "https://corda.r3.com/net/corda/schema/configuration/stateManager/1.0/corda.stateManager.json",
"title": "Corda State Manager Configuration Schema",
"description": "Configuration schema for the State Manager section. This configures the interactions of the workers with the underlying underlying persistent storage used by the out of process State Manager.",
"description": "Configuration schema for the State Manager section. This configures the interactions of the workers with the underlying persistent storage used by the out of process State Manager.",
"type": "object",
"properties": {
"type": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"properties": {
"databaseProperties": {
"description": "Settings to connect to the State Manager Database.",
"$ref": "state-manager-db-properties.json"
"$ref": "stateManager-db-properties.json"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/stdb/1.0/corda.db.json",
"$id": "https://corda.r3.com/net/corda/schema/configuration/stateManager/1.0/stateManager-db-properties.json",
"title": "State Manager Database Configuration Schema",
"description": "Configuration schema for the database section. Note that this configuration cannot be updated dynamically through the REST endpoint.",
"type": "object",
Expand All @@ -23,6 +23,11 @@
"type": "object",
"default": {},
"properties": {
"url": {
"description": "The JDBC URL.",
"type": "string",
"default": "jdbc:postgresql://state-manager-db:5432/state_manager"
},
"driver": {
"description": "The JDBC driver.",
"type": "string",
Expand All @@ -32,16 +37,6 @@
"description": "The directory that contains the JDBC drivers.",
"type": "string",
"default": "/opt/jdbc-driver"
},
"url": {
"description": "The JDBC URL.",
"type": "string",
"default": "jdbc:postgresql://state-manager-db:5432/state_manager"
},
"persistenceUnitName": {
"description": "The persistent unit name.",
"type": "string",
"default": "corda-state-manager"
}
},
"additionalProperties": false
Expand Down

0 comments on commit adeb932

Please sign in to comment.