You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by gk...@apache.org on 2024/03/25 17:41:57 UTC

(turbine-archetypes) 01/03: Add additional jetty-env.xml to work on with commons datasource

This is an automated email from the ASF dual-hosted git repository.

gk pushed a commit to branch turbine-6-mariadb-10-java-11
in repository https://gitbox.apache.org/repos/asf/turbine-archetypes.git

commit af092141f29060660a28de0400f8f6621a5092da
Author: Georg Kallidis <gk...@apache.org>
AuthorDate: Mon Mar 25 18:21:02 2024 +0100

    Add additional jetty-env.xml to work on with commons datasource
---
 .../WEB-INF/jetty-env-commons-datasource.xml       | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jetty-env-commons-datasource.xml b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jetty-env-commons-datasource.xml
new file mode 100644
index 0000000..fa127c5
--- /dev/null
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jetty-env-commons-datasource.xml
@@ -0,0 +1,29 @@
+<Configure class="org.eclipse.jetty.webapp.WebAppContext">
+  <New id="Turbine" class="org.eclipse.jetty.plus.jndi.Resource">
+    <Arg></Arg> <!-- reference to WebAppContext requires jetty 9.x only  -->
+    <Arg>${turbine_database_jndipath}</Arg>
+    <Arg>
+        <New class="org.apache.commons.dbcp2.BasicDataSource">
+           <Set name="driverClassName">${turbine_database_driver}</Set>
+             <Set name="url">${turbine_database_url}${turbine_database_name}</Set>
+            <Set name="username">${turbine_database_user}</Set>
+            <Set name="password">${turbine_database_password}</Set>
+            <Set name="connectionProperties">useSSL=false</Set>
+            <!-- useSSL=true&enabledSslProtocolSuites=TLSv1.1&autoReconnect=true&disableSslHostnameVerification=true --> 
+            <!-- Set name="connectionProperties">serverTimezone=${turbine_database_timezone};useUnicode=true;characterEncoding=utf8;useSSL=false;allowPublicKeyRetrieval=true</Set -->
+            <Set name="validationQuery">SELECT 1</Set>          
+        </New>
+    </Arg>
+  </New>
+  
+  <Set name="extraClasspath"></Set>
+  <Call name="setAttribute">
+      <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
+      <Arg>.*/spring-[^/]*\.jar$</Arg>
+  </Call>  
+  <Call name="setAttribute">
+      <Arg>org.eclipse.jetty.annotations.multiThreaded</Arg>
+      <Arg type="Boolean">false</Arg>
+    </Call>
+    
+</Configure>