IMPORTANT: How to set up additional datastore parameters in war-context.xml?

So I have added a second datastore to the application, to support shared data - it works fine locally in development mode, since both the DBs are just on my local PostGRES installation. Of course, at deploy/runtime these need to be different.

Before the second datastore it was easy - war-content.xml contains:

<Context>

    <!-- Database connection -->
    <Resource
      name="jdbc/CubaDS"
      type="javax.sql.DataSource"
      maxTotal="20"
      maxIdle="2"
      maxWaitMillis="5000"
      driverClassName="org.postgresql.Driver"
      url="jdbc:postgresql://postgres/medflexj"
      username="postgres"
      password="nah"/>

    <!-- Switch off session serialization -->
    <Manager pathname=""/>
</Context>

The machine postgres is just another container, composed with docker compose.

For the shared data, I have another PostGRES running in a container, exposing port 10864 - but I don’t know how to set up the second datastore in war-context.xml - no examples exist that I can find. (And I’m not even sure where I got the configuration for the main datastore; I think that was auto-generated ages ago…)

I need help with this… Or a pointer to somewhere as to how to set up that second datastore in that war-context.xml.

@krivopustov @albudarov ? :slight_smile: Anyone?

Hmm, seems like war-context.xml isn’t the preferred way anymore? Seems that stuff is just set in build.gradle in the appProperties section now?