Skip to content

Commit

Permalink
jetty plugin for 'local' work
Browse files Browse the repository at this point in the history
  • Loading branch information
cmangeat committed Oct 31, 2024
1 parent ecf1a93 commit f3997b1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<properties>
<customer>custom</customer>
<customer.bundle>swiss-custom</customer.bundle>
<jetty.version>jetty-9.4.56.v20240826</jetty.version>
<jetty.version>9.4.27.v20200227</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
7 changes: 7 additions & 0 deletions web/jetty-context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>^$</Arg>
</Call>
</Configure>
36 changes: 36 additions & 0 deletions web/jetty-env.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<New id="gnparameters" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>gnDatabaseDialect</Arg>
<Arg>H2</Arg>
</New>

<New id="gnresources" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>jdbc/geonetwork</Arg>
<Arg>
<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="driverClassName">org.h2.Driver</Set>
<Set name="url">jdbc:h2:gn;LOCK_TIMEOUT=20000;DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE</Set>
<Set name="username">dblasby</Set>
<Set name="password">dblasby</Set>
<Set name="validationQuery">SELECT 1</Set>
<Set name="maxActive">10</Set>
<Set name="maxIdle">10</Set>
<Set name="removeAbandoned">true</Set>
<Set name="removeAbandonedTimeout">3600</Set>
<Set name="logAbandoned">true</Set>
<Set name="testOnBorrow">true</Set>
<Set name="defaultAutoCommit">false</Set>
<Set name="defaultTransactionIsolation">2</Set>
<Set name="accessToUnderlyingConnectionAllowed">true</Set>
</New>
</Arg>
<Call name="bindToENC">
<Arg>jdbc/geonetwork</Arg>
</Call>
</New>
</Configure>

0 comments on commit f3997b1

Please sign in to comment.