Deploying app with jndi on tomcat

Hi,
i’m deploying my cuba webapp on tomcat (linux server).

My config is:

  • Cuba 7.2.11
  • Tomcat 9
  • PostgresSQL (Main DataSource) [DS1]
  • PostgresSQL (Scondary Ds) [DS2]
  • Hsql (another Ds) [DS3]

I would use jndi, so my application have a context.xml with DS1 and DS2 defined into it and DS3 is configured to app.properties file (application) .

Checking my connections over db (DS1) there is only one connection. (Otherwise with application config (no jndi) of datasource i find a pool of connections as espected) .Why?

I hope that my question is clear…
Thanks.

I have found the solution. The initialSize parameter must be set in the context.xml. The default value is not considered