Configuring the server database when integrating with an application server

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:

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: