=== modified file 'src/com/goldencode/p2j/persist/orm/ConnectionProvider.java'
--- old/src/com/goldencode/p2j/persist/orm/ConnectionProvider.java	2026-05-20 10:46:52 +0000
+++ new/src/com/goldencode/p2j/persist/orm/ConnectionProvider.java	2026-06-08 09:26:35 +0000
@@ -7,6 +7,9 @@
 ** -#- -I- --Date-- --------------------------------Description--------------------------------
 ** 001 AS  20260313 Created initial version.
 ** 002 AS  20260319 Addef cfg, blob and clob creators initialization for h2 connections.
+** 003 TG  20260608 Route the dirty-share H2 database through the pooled JdbcDataSource so its
+**                  connections are recycled instead of opened and discarded on every dirty-share
+**                  operation.
 */
 
 /*
@@ -109,7 +112,13 @@
       boolean isH2 = jdbcUrl.startsWith("jdbc:h2:mem:");
       try
       {
-         return isH2 && !database.isTemporary() ? getH2Connection(database, jdbcUrl, cfg) :
+         // The dirty-share database is a single, long-lived in-memory H2 instance (one per primary
+         // database) that is accessed concurrently by many session contexts.  Route it through the
+         // pooled JdbcDataSource so its connections are recycled across getDirtyInfo()/insert/update/...
+         // calls instead of being created and discarded per call.  Other non-temporary H2 databases
+         // keep the direct DriverManager connection; temporary databases are handled by JdbcDataSource.
+         boolean direct = isH2 && !database.isTemporary() && !database.isDirty();
+         return direct ? getH2Connection(database, jdbcUrl, cfg) :
                        JdbcDataSource.getConnection(jdbcUrl, database, cfg, tenantName);
       }
       catch (SQLException e)

