Skip to content

Commit

Permalink
PegaRULESLongRW does not take password (#418)
Browse files Browse the repository at this point in the history
* BUG-720063 always use same PegaRULES user/password for LongRW datasource

* append LongRW connection properties to passed properties. If duplicated, last property wins


Co-authored-by: tandz <[email protected]>
  • Loading branch information
zitikay and tandz authored May 16, 2022
1 parent ff208ed commit a221a71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions charts/pega/config/deploy/context.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
minEvictableIdleTimeMillis="60000"
/>

{{ if and .Env.DB_RW_USERNAME .Env.JDBC_RW_URL }}
{{ if or .Env.SET_RW .Env.JDBC_RW_URL }}
<Resource name="jdbc/PegaRULESLongRW"
auth="Container"
type="javax.sql.DataSource"
driverClassName="{{ .Env.JDBC_CLASS }}"
url="{{ .Env.JDBC_RW_URL }}"
username="{{ .Env.DB_RW_USERNAME }}"
password=""
url="{{- if .Env.JDBC_RW_URL -}}{{ .Env.JDBC_RW_URL }}{{- else -}}{{ .Env.JDBC_URL }}{{- end -}}"
username="{{ .Env.SECRET_DB_USERNAME }}"
password="{{ .Env.SECRET_DB_PASSWORD }}"
maxTotal="{{ .Env.JDBC_MAX_ACTIVE }}"
minIdle="{{ default .Env.JDBC_RO_MIN_IDLE .Env.JDBC_MIN_IDLE }}"
minIdle="{{ .Env.JDBC_MIN_IDLE }}"
maxIdle="{{ .Env.JDBC_MAX_IDLE }}"
maxWaitMillis="{{ .Env.JDBC_MAX_WAIT }}"
initialSize="{{ default .Env.JDBC_RO_INITIAL_SIZE .Env.JDBC_INITIAL_SIZE }}"
connectionProperties="socketTimeout=1200;statement_timeout=1200500;idle_in_transaction_session_timeout=1200500;"
initialSize="{{ .Env.JDBC_INITIAL_SIZE }}"
connectionProperties="{{ .Env.JDBC_CONNECTION_PROPERTIES }};socketTimeout=1200;statement_timeout=1200500;idle_in_transaction_session_timeout=1200500;"
timeBetweenEvictionRunsMillis="30000"
minEvictableIdleTimeMillis="60000"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
minEvictableIdleTimeMillis="60000"
/>

{{ if and .Env.DB_RW_USERNAME .Env.JDBC_RW_URL }}
{{ if or .Env.SET_RW .Env.JDBC_RW_URL }}
<Resource name="jdbc/PegaRULESLongRW"
auth="Container"
type="javax.sql.DataSource"
driverClassName="{{ .Env.JDBC_CLASS }}"
url="{{ .Env.JDBC_RW_URL }}"
username="{{ .Env.DB_RW_USERNAME }}"
password=""
url="{{- if .Env.JDBC_RW_URL -}}{{ .Env.JDBC_RW_URL }}{{- else -}}{{ .Env.JDBC_URL }}{{- end -}}"
username="{{ .Env.SECRET_DB_USERNAME }}"
password="{{ .Env.SECRET_DB_PASSWORD }}"
maxTotal="{{ .Env.JDBC_MAX_ACTIVE }}"
minIdle="{{ default .Env.JDBC_RO_MIN_IDLE .Env.JDBC_MIN_IDLE }}"
minIdle="{{ .Env.JDBC_MIN_IDLE }}"
maxIdle="{{ .Env.JDBC_MAX_IDLE }}"
maxWaitMillis="{{ .Env.JDBC_MAX_WAIT }}"
initialSize="{{ default .Env.JDBC_RO_INITIAL_SIZE .Env.JDBC_INITIAL_SIZE }}"
connectionProperties="socketTimeout=1200;statement_timeout=1200500;idle_in_transaction_session_timeout=1200500;"
initialSize="{{ .Env.JDBC_INITIAL_SIZE }}"
connectionProperties="{{ .Env.JDBC_CONNECTION_PROPERTIES }};socketTimeout=1200;statement_timeout=1200500;idle_in_transaction_session_timeout=1200500;"
timeBetweenEvictionRunsMillis="30000"
minEvictableIdleTimeMillis="60000"
/>
Expand Down

0 comments on commit a221a71

Please sign in to comment.