Skip to content

Commit

Permalink
Extracting JNDI datastore, too
Browse files Browse the repository at this point in the history
  • Loading branch information
reinout committed Jan 5, 2024
1 parent c67bdeb commit f4d08d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 31 deletions.
16 changes: 8 additions & 8 deletions serverscripts/geoserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ def extract_datastore_info(datastore_file):
connection, "./entry[@key='database']"
)
result["database_user"] = get_text_or_none(connection, "./entry[@key='user']")
# result["database_namespace"] = get_text_or_none(
# connection, "./entry[@key='namespace']"
# )
jndi_connection = get_text_or_none(connection, "./entry[@key='jndiReferenceName']")
if jndi_connection:
result["database_name"] = jndi_connection

return result

Expand Down Expand Up @@ -196,11 +196,11 @@ def extract_from_dirs(data_dir):
for workspace_datastore_file in workspace_datastore_files
]
for key in [
"enabled",
"type",
"database_server",
"database_user",
"database_name",
"enabled",
"type",
"database_server",
"database_user",
"database_name",
]:
workspace[key] = _combine_with_comma(datastores, key)
result[workspace_name] = workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,24 @@
<id>DataStoreInfoImpl-52b81a0d:16feab49b5d:-7afd</id>
<name>u0106</name>
<description>Kloosterzande assets</description>
<type>PostGIS</type>
<type>PostGIS (JNDI)</type>
<enabled>true</enabled>
<workspace>
<id>WorkspaceInfoImpl-52b81a0d:16feab49b5d:-7b01</id>
</workspace>
<connectionParameters>
<entry key="schema">public</entry>
<entry key="Evictor run periodicity">300</entry>
<entry key="Max open prepared statements">50</entry>
<entry key="encode functions">false</entry>
<entry key="Estimated extends">true</entry>
<entry key="Batch insert size">1</entry>
<entry key="preparedStatements">false</entry>
<entry key="database">staging-project-geoserver</entry>
<entry key="host">s-project-db-d1.nens</entry>
<entry key="Loose bbox">true</entry>
<entry key="Estimated extends">true</entry>
<entry key="fetch size">1000</entry>
<entry key="Method used to simplify geometries">FAST</entry>
<entry key="fetch size">5000</entry>
<entry key="encode functions">true</entry>
<entry key="jndiReferenceName">java:comp/env/jdbc/klimaatatlas_geoserver</entry>
<entry key="Expose primary keys">false</entry>
<entry key="validate connections">true</entry>
<entry key="Support on the fly geometry simplification">true</entry>
<entry key="Connection timeout">20</entry>
<entry key="create database">false</entry>
<entry key="port">5432</entry>
<entry key="passwd">crypt2:VKqOzz9nVJencJVUIrUQfXje7SdCdTryWkFfP2ilzN0=</entry>
<entry key="min connections">1</entry>
<entry key="dbtype">postgis</entry>
<entry key="namespace">u0106_3Dzeeland</entry>
<entry key="max connections">10</entry>
<entry key="Evictor tests per run">3</entry>
<entry key="Test while idle">true</entry>
<entry key="user">staging-project-geoserver</entry>
<entry key="Max connection idle time">300</entry>
<entry key="namespace">hhnk</entry>
<entry key="Loose bbox">true</entry>
</connectionParameters>
<__default>false</__default>
</dataStore>
</dataStore>

0 comments on commit f4d08d8

Please sign in to comment.