JReport Server manages dynamic connections by the DynamicConnectionManager. Users can call jet.server.api.admin.AdminService.getDynamicConnectionManager() to get the DynamicConnectionManager object, and call its methods addDynamicConnection(...), updateDynamicConnection(...) or removeDynamicConnection(...) to maintain dynamic connections for multiple tenancy clients by programs.
When running a report, the server calls the DynamicConnectionProvider (the built-in provider calls DynamicConnectionManager internally) to get dynamic connections for all used data sources at first and then passes the dynamic connection properties into the engine. The engine will merge the changed properties with the original catalog connection properties to setup the database connection.
Users can implement jet.server.api.dynamiccon.DynamicConnectionProvider to get dynamic connections from their own systems and then register a customized DynamicConnectionProvider into JReport Server by adding the option server.custom.DynamicConnectionProvider in the server.properties file in <install_root>\bin
.
For detailed usages about the dynamic connection API, see JReport Javadoc jet.server.api.dynamiccon package in <install_root>\help\api
.