The getProcessEngineConfiguration methods (for Jdbc) does not match actual configs being used by engine

I am assuming there is a obvious reason for this ;), but I am not aware of it, hence the question:

So if you run something like

execution.getProcessEngineServices().getProcessEngineConfiguration()

according to: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/ProcessEngineServices.html > Sub-Interface > https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/ProcessEngine.html > Method > getProcessEngineConfiguration(), I should get the ProcessEngineConfiguration object.

Which I do… But the information in the object (at least specific to the Jdbc information) is not correct.
I am running this on default Camunda Docker container, with default H2 db.

Getting the Jdbc username, password, url returns what appear to be default values.
So,
Username: sa
password: [empty string]
url: jdbc:h2:tcp://localhost/activiti

when the actual info is:
Username: sa
Password: sa
url: jdbc:h2:./camunda-h2-dbs/process-engine
as pulled from: https://docs.camunda.org/manual/7.8/installation/full/tomcat/pre-packaged/#accessing-the-h2-console

So what am i doing wrong? I am looking to pull the current/live engine configuration properties. (in this case the specific JDBC configs as i am running some example tests with direct SQL queries to the h2 DB through scripting using JOOQ DSL.

Thanks!

@thorben any insights on this api behaviour?

Hi Stephen,

In the Tomcat distribution, the datasource is looked up via JNDI, so the username, password, etc. properties are not used and return the default values. It is also not possible to derive them from a datasource object.

Cheers,
Thorben

@thorben can we access the information through JNDI or is there another blocker?

Not that I know but I am not an expert on that.