NO.1 JNDI connection using the principles
- In the Report Designer to use JDBC to connect to the database, create a database connection, and then create a dataset using SQL or other methods, making better use of data collection reports, and then establish a connection to the database from JDBC connection into JNDI connection, save the report template and deploy to weblogic server.
- Reports server configuration data sources.
- Modify the application web.xml file under WEB-INF.
So that you can browse through a WEB browser to use the report of the JNDI data sources.
NO.2 Our oracle 10g data source produced an example to illustrate the template jndi.cpt
- Report Designer create reports:In the designer using JDBC to connect to oracle 10g database, using the data in the database table student produced the following template jndi.cpt:
Back to the definition of a data connection panel, previously defined database connection becomes JNDI connection, set the JNDI name for the oracle
Save the template to the application directory under weblogic 10 WebReport / WEB-INF / reportlets, save for jndi.cpt. At this point the server side data source is not configured, start the server and access the jndi report shows an error similar to the following:
- Server-side configuration data sources:Open weblogic control interface 10: http: // localhost: 7001 / console; login weblogic server domain select the domain structure | Services | JDBC | Data Sources to open the data source configuration interface:
Lock and edit the interface, a new data source, set new data source JNDI name for the oracle (ie, the production of the template definition JNDI name), select the database type and drive click “Next”, as shown below:
Transaction options according to their requirements definition, in this default, click “Next”
Configure the connection properties: database name, URL, user name and password, weblogic 10 to establish a physical connection oracle 10g
Testing just defined data source connection: Before weblogic server configuration will show us good data source, and provides the connection test, click on the “Test Configuration” pop-up message “connection test was successful,” explained configured correctly, click “Next”
Deploy the new JDBC data source: Select the data source you need to deploy a server, click the “Finish”
Server-side data source configured, the application after deployment can be configured to activate the connection with the oracle database through “oracle” This bridge (JNDI name)
- Modify the application WebReport / web.xml file under web-inf:
Between …… add the following sentence:
- Fully configured, you can access the JNDI data source for the report.