Index: main/plugin-site/i18n/messages_en.xml
===================================================================
--- main/plugin-site/i18n/messages_en.xml	(revision 38969)
+++ main/plugin-site/i18n/messages_en.xml	(working copy)
@@ -25,20 +25,14 @@
     <message key="SITE_CONFIG_ROOT_CATEGORY">Cache</message>
     <message key="SITE_CONFIG_ROOT_GROUP">Directories</message>
     
-	<!-- 
-		MONITORING CACHE
-	-->
+    <!-- 
+        MONITORING CACHE
+    -->
     
     <!-- DATASOURCE -->
     <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_GROUP">Monitoring database connection</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DRIVER_LABEL">Driver</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DRIVER_DESCRIPTION">JDBC Driver fully qualified class name</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_URL_LABEL">Url</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_URL_DESCRIPTION">JDBC URL for connecting to the database</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_USER_LABEL">User</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_USER_DESCRIPTION">User name for connecting to the database</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_PASSWORD_LABEL">Password</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_PASSWORD_DESCRIPTION">Password associated with the user name for connecting to the database</message>
+    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_LABEL">Monitoring database</message>
+    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DESCRIPTION">Specify here the data source to use as the monitoring database. It will be used to store monitoring statistics on this site.</message>
     
     <!-- HTTPServer LOGS -->
     <message key="CONFIG_CACHE_MONITORING_HTTPSERVER_GROUP">HTTP server access logs</message>
@@ -52,4 +46,4 @@
     <message key="CONFIG_CACHE_MONITORING_HANDLING_ENABLE_LABEL">Enable</message>
     <message key="CONFIG_CACHE_MONITORING_HANDLING_ENABLE_DESCRIPTION">Activate the background statistics processing (every hour on the dot: 1h00, 2h00...). To consult the statistics correctly, see the installation guide.</message>
     
-</catalogue>
+</catalogue>
\ No newline at end of file
Index: main/plugin-site/i18n/messages_fr.xml
===================================================================
--- main/plugin-site/i18n/messages_fr.xml	(revision 38969)
+++ main/plugin-site/i18n/messages_fr.xml	(working copy)
@@ -31,14 +31,8 @@
 
     <!-- DATASOURCE -->
     <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_GROUP">Connexion à la base de données de monitoring</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DRIVER_LABEL">Pilote</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DRIVER_DESCRIPTION">Nom complet de la classe driver JDBC à charger</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_URL_LABEL">Url</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_URL_DESCRIPTION">Url JDBC de connexion au serveur de base de données</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_USER_LABEL">Utilisateur</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_USER_DESCRIPTION">Nom d'utilisateur à utiliser lors de la connexion au serveur de base de données</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_PASSWORD_LABEL">Mot de passe</message>
-    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_PASSWORD_DESCRIPTION">Mot de passe associé au nom d'utilisateur à utiliser lors de la connexion au serveur de base de données</message>
+    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_LABEL">Base de données de monitoring</message>
+    <message key="CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DESCRIPTION">Spécifiez ici la source de données à utiliser en tant que base de données de monitoring. Elle sera utilisée pour stocker des statistiques de monitoring sur ce site.</message>
     
     <!-- HTTPSERVER LOGS -->
     <message key="CONFIG_CACHE_MONITORING_HTTPSERVER_GROUP">Fichiers de log du serveur HTTP</message>
Index: main/plugin-site/plugin.xml
===================================================================
--- main/plugin-site/plugin.xml	(revision 38969)
+++ main/plugin-site/plugin.xml	(working copy)
@@ -152,14 +152,7 @@
 	
     <feature name="site.user.ldap.and.jdbc.credentialsaware" depends="core-impl/runtime.datasource.core">
         <config>
-            <param-ref id="runtime.datasource.core.ldap.baseUrl"/>
-            <param-ref id="runtime.datasource.core.ldap.useSSL"/>
-            <param-ref id="runtime.datasource.core.ldap.baseDN"/>
-            <param-ref id="runtime.datasource.core.ldap.authMethod"/>
-            <param-ref id="runtime.datasource.core.ldap.adminDN"/>
-            <param-ref id="runtime.datasource.core.ldap.adminPasswd"/>
-            <param-ref id="runtime.datasource.core.ldap.aliasDereferencing"/>
-            <param-ref id="runtime.datasource.core.ldap.followReferrals"/>
+            <param-ref id="runtime.datasource.core.ldap"/>
             
             <param-ref id="runtime.users.ldap.peopleDN"/>
             <param-ref id="runtime.users.ldap.baseFilter"/>
@@ -175,15 +168,6 @@
                        id="org.ametys.plugins.site.users.CredentialsAwareLdapAndJdbc"
                        class="org.ametys.runtime.plugins.core.user.mixed.CredentialsAwareLdapAndJdbcUsersManager"
                        logger="org.ametys.runtime.plugins.core.user.mixed.ldap.and.jdbc.credential">
-                <BaseUrl>runtime.datasource.core.ldap.baseUrl</BaseUrl>
-                <UseSSL>runtime.datasource.core.ldap.useSSL</UseSSL>
-                <BaseDN>runtime.datasource.core.ldap.baseDN</BaseDN>
-                <AuthenticationMethod>runtime.datasource.core.ldap.authMethod</AuthenticationMethod>
-                <AdminDN>runtime.datasource.core.ldap.adminDN</AdminDN>
-                <AdminPassword>runtime.datasource.core.ldap.adminPasswd</AdminPassword>
-                <AliasDereferencing>runtime.datasource.core.ldap.aliasDereferencing</AliasDereferencing>
-                <FollowReferrals>runtime.datasource.core.ldap.followReferrals</FollowReferrals>
-                
                 <RelativeDN>runtime.users.ldap.peopleDN</RelativeDN>
                 <Filter>runtime.users.ldap.baseFilter</Filter>
                 <SearchScope>runtime.users.ldap.scope</SearchScope>
@@ -276,14 +260,7 @@
     
     <feature name="site.user.siteaware.ldap-and-jbdc.modifiablecredentialsaware" depends="core-impl/runtime.datasource.core">
         <config>
-            <param-ref id="runtime.datasource.core.ldap.baseUrl"/>
-            <param-ref id="runtime.datasource.core.ldap.useSSL"/>
-            <param-ref id="runtime.datasource.core.ldap.baseDN"/>
-            <param-ref id="runtime.datasource.core.ldap.authMethod"/>
-            <param-ref id="runtime.datasource.core.ldap.adminDN"/>
-            <param-ref id="runtime.datasource.core.ldap.adminPasswd"/>
-            <param-ref id="runtime.datasource.core.ldap.aliasDereferencing"/>
-            <param-ref id="runtime.datasource.core.ldap.followReferrals"/>
+            <param-ref id="runtime.datasource.core.ldap"/>
             
             <param-ref id="runtime.users.ldap.peopleDN"/>
             <param-ref id="runtime.users.ldap.baseFilter"/>
@@ -299,15 +276,6 @@
                        id="org.ametys.plugins.site.users.SiteCredentialsAwareLdapAndJdbc"
                        class="org.ametys.plugins.site.users.SiteCredentialsAwareLdapAndJdbcUsersManager"
                        logger="org.ametys.runtime.plugins.core.users.jdbc.credentialmodifiable">
-                <BaseUrl>runtime.datasource.core.ldap.baseUrl</BaseUrl>
-                <UseSSL>runtime.datasource.core.ldap.useSSL</UseSSL>
-                <BaseDN>runtime.datasource.core.ldap.baseDN</BaseDN>
-                <AuthenticationMethod>runtime.datasource.core.ldap.authMethod</AuthenticationMethod>
-                <AdminDN>runtime.datasource.core.ldap.adminDN</AdminDN>
-                <AdminPassword>runtime.datasource.core.ldap.adminPasswd</AdminPassword>
-                <AliasDereferencing>runtime.datasource.core.ldap.aliasDereferencing</AliasDereferencing>
-                <FollowReferrals>runtime.datasource.core.ldap.followReferrals</FollowReferrals>
-                
                 <RelativeDN>runtime.users.ldap.peopleDN</RelativeDN>
                 <Filter>runtime.users.ldap.baseFilter</Filter>
                 <SearchScope>runtime.users.ldap.scope</SearchScope>
@@ -335,57 +303,27 @@
          | CACHE MONITORING
          + -->
     <feature name="front.cache.monitoring.datasource">
-	    <config>
-	        <!-- Monitoring Datasource -->
-	        <param id="front.cache.monitoring.datasource.jdbc.driver" type="string">
-	            <label i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DRIVER_LABEL</label>
-	            <description i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DRIVER_DESCRIPTION</description>
-	            <validation>
-	                <mandatory/>
-	            </validation>
-	            <default-value>com.mysql.jdbc.Driver</default-value>
-	            <category i18n="true">plugin.core-impl:PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE</category>
-	            <group i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_GROUP</group>
-	            <order>10</order>
-	        </param>
-	        <param id="front.cache.monitoring.datasource.jdbc.url" type="string">
-	            <label i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_URL_LABEL</label>
-	            <description i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_URL_DESCRIPTION</description>
-	            <validation>
-	                <mandatory/>
-	            </validation>
-	            <default-value>jdbc:mysql://servername/basename</default-value>
-	            <category i18n="true">plugin.core-impl:PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE</category>
-	            <group i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_GROUP</group>
-	            <order>20</order>
-	        </param>
-	        <param id="front.cache.monitoring.datasource.jdbc.user" type="string">
-	            <label i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_USER_LABEL</label>
-	            <description i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_USER_DESCRIPTION</description>
-	            <default-value>username</default-value>
-	            <category i18n="true">plugin.core-impl:PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE</category>
-	            <group i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_GROUP</group>
-	            <order>30</order>
-	        </param>
-	        <param id="front.cache.monitoring.datasource.jdbc.passwd" type="password">
-	            <label i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_PASSWORD_LABEL</label>
-	            <description i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_PASSWORD_DESCRIPTION</description>
-	            <category i18n="true">plugin.core-impl:PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE</category>
-	            <group i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_GROUP</group>
-	            <order>40</order>
-	        </param>
-	    </config>
-        
-        <extensions>
-            <extension point="org.ametys.core.datasource.DataSourceExtensionPoint" 
-                       id="cache.monitoring.datasource"
-                       logger="org.ametys.front.cache.monitoring.datasource">
-                <driver runtime-config-parameter="front.cache.monitoring.datasource.jdbc.driver"/>
-                <dburl runtime-config-parameter="front.cache.monitoring.datasource.jdbc.url"/>
-                <user runtime-config-parameter="front.cache.monitoring.datasource.jdbc.user"/>
-                <password runtime-config-parameter="front.cache.monitoring.datasource.jdbc.passwd"/>
-            </extension>
-        </extensions>
+        <!-- Front-office Monitoring Datasource -->
+        <config>
+            <param id="front.cache.monitoring.datasource.jdbc.pool" type="datasource">
+                <!-- 
+                    This parameter contains the jdbc driver class to load to connect the core database pool.
+                 -->
+                <label i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_LABEL</label>
+                <description i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_DESCRIPTION</description>
+                <widget>edition.datasource-sql</widget>
+                <widget-params>
+                    <param name="allowCreation">true</param>
+                    <param name="allowPrivate">true</param>
+                </widget-params>
+                <validation>
+                    <mandatory/>
+                </validation>
+                <category i18n="true">plugin.core-impl:PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE</category>
+                <group i18n="true">CONFIG_CACHE_MONITORING_DATASOURCE_JDBC_GROUP</group>
+                <order>10</order>
+            </param>
+        </config>
     </feature>
     
     <feature name="front.cache.monitoring.schedulers" depends="front.cache.monitoring.datasource">
Index: main/plugin-site/src/org/ametys/plugins/site/cache/monitoring/Constants.java
===================================================================
--- main/plugin-site/src/org/ametys/plugins/site/cache/monitoring/Constants.java	(revision 38969)
+++ main/plugin-site/src/org/ametys/plugins/site/cache/monitoring/Constants.java	(working copy)
@@ -22,7 +22,7 @@
 public interface Constants
 {
     /** The name of the SQL pool to access monitoring datasource */
-    public static final String MONITORING_DATASOURCE_POOLNAME = "cache.monitoring.datasource";
+    public static final String MONITORING_DATASOURCE_POOL_CONFIG_PARAM = "cache.monitoring.datasource";
 
     /** The name of the table for front resource access */
     public static final String SQL_TABLE_NAME_FRONT_ACCESS = "Cache_RA_Front";
Index: main/plugin-site/src/org/ametys/plugins/site/cache/monitoring/process/access/ResourceAccessComponent.java
===================================================================
--- main/plugin-site/src/org/ametys/plugins/site/cache/monitoring/process/access/ResourceAccessComponent.java	(revision 38969)
+++ main/plugin-site/src/org/ametys/plugins/site/cache/monitoring/process/access/ResourceAccessComponent.java	(working copy)
@@ -103,10 +103,9 @@
         // Export
         if (!resourcesAccesstoExport.isEmpty())
         {
-            Connection connection = null;
-            try
+            String dataSourceId = Config.getInstance().getValueAsString(Constants.MONITORING_DATASOURCE_POOL_CONFIG_PARAM);
+            try (Connection connection = ConnectionHelper.getConnection(dataSourceId);)
             {
-                connection = ConnectionHelper.getConnection(Constants.MONITORING_DATASOURCE_POOLNAME);
                 successCount = _fillDatabase(connection, resourcesAccesstoExport);
             }
             catch (Exception e)
@@ -114,10 +113,6 @@
                 getLogger().error("Cannot export pending logs to database", e);
                 throw new RuntimeException(e);
             }
-            finally
-            {
-                ConnectionHelper.cleanup(connection);
-            }
         }
 
         if (getLogger().isDebugEnabled())
