Update notes

This commit is contained in:
2018-01-12 06:07:03 +02:00
parent d5ec4072eb
commit 21acf07165
42 changed files with 114 additions and 54 deletions

View File

@ -640,7 +640,7 @@ dspace6=# CREATE EXTENSION pgcrypto;
- Also, local settings are no longer in `build.properties`, they are now in `local.cfg`
- I'm not sure if we can use separate profiles like we did before with `mvn -Denv=blah` to use blah.properties
- It seems we need to use "system properties" to override settings, ie: `-Ddspace.dir=/Users/aorth/dspace7`
- It seems we need to use "system properties" to override settings, ie: `-Ddspace.dir=/Users/aorth/dspace6`
## 2017-11-15

View File

@ -488,3 +488,31 @@ cache_alignment : 64
111535 2607:fa98:40:9:26b6:fdff:feff:1c96
161797 2607:fa98:40:9:26b6:fdff:feff:1888
```
- Wow, I just figured out how to set the application name of each database pool in the JNDI config of Tomcat's `server.xml`:
```
<Resource name="jdbc/dspaceWeb" auth="Container" type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/dspacetest?ApplicationName=dspaceWeb"
username="dspace"
password="dspace"
initialSize='5'
maxActive='75'
maxIdle='15'
minIdle='5'
maxWait='5000'
validationQuery='SELECT 1'
testOnBorrow='true' />
```
- So theoretically I could name each connection "xmlui" or "dspaceWeb" or something meaningful and it would show up in PostgreSQL's `pg_stat_activity` table!
- This would be super helpful for figuring out where load was coming from (now I wonder if I could figure out how to graph this)
- Also, I realized that the `db.jndi` parameter in dspace.cfg needs to match the `name` value in your applicaiton's context—not the `global` one
- Ah hah! Also, I can name the default DSpace connection pool in dspace.cfg as well, like:
```
db.url = jdbc:postgresql://localhost:5432/dspacetest?ApplicationName=dspaceDefault
```
- With that it is super easy to see where PostgreSQL connections are coming from in `pg_stat_activity`