JReport Enterprise Server supports connecting an RDBMS to access its system data via JDBC. The JDBC configuration information is stored in the file dbconfig.xml in <install_root>\bin. You can create a database connection according to this configuration file. Also, with the Java EE data source support feature, in a Java EE environment, JReport Enterprise Server can get the predefined javax.sql.DataSource by JNDI APIs.
Here, the term dsInfo is used to indicate where JReport Enterprise Server can obtain the JDBC connection information. It is a key-value pair. The name and value for dsInfo are defined as below:
Where,
<dbname> is JReport Enterprise Server's inner database name. It must be systable or profiling. For example, the dsInfo name is jreport.datasource.systables.
file:///absolute_path_of_config_file
For example: file:///JReport/Server/bin/dbconfig.xml
jdbc://[<jdbc-user:jdbc-password>@]<jdbc-url>[#<attribute-name=attribute-value>,]
For example: jdbc://user:password@jdbc:odbc:jreport-systables#driver=sun.jdbc.odbc.JdbcOdbcDriver
jndi://[<jdbc-user:jdbc-passoword>@]datasource_name[#<attribute-name=attribute-value>,]
For example: jndi://jdbc/jreport-systables
The dsInfo can be specified in several places or levels, such as VM properties, ejb-jar.xml, web.xml and <install_root>\bin\dbconfig.xml. The sequence to load the information is:
VM system environment > ejb-jar.xml (EAR mode) > web.xml (WAR mode) > dbconfig.xml.
Notes:
The following sections focus on specifying the dsInfo in web.xml, ejb-jar.xml, and dbconfig.xml: