Example 7: Via WebLogic 6.1 Connection Pool
This topic introduces how to set up a JDBC Connection via WebLogic 6.1 Connection Pool.
Assume that a catalog has been created with a default data source in Logi JReport Designer. Take the following steps to set up a connection which connects Logi JReport Designer to a database via the WebLogic 6.1 Connection Pool:
- Set up the WebLogic Connection Pool.
- Assume that the WebLogic Server has been started, access the console through a web browser (
http://host:7001/console
). Then, go to the left panel, and expand the JDBC node. - Select the Connection Pools node. All the defined connection pools will be displayed in the right panel.
- Select the Configure a New JDBC Connection Pool link.
- In the Configuration tab, define the connection pool as follows. Then, select the Create button.
Name: jinfonet
URL: jdbc:odbc:jinfonet
Driver Classname: sun.jdbc.odbc.JdbcOdbcDriver
- Assume that the WebLogic Server has been started, access the console through a web browser (
- Check the Connection Pool.
In the Monitoring tab, select the link Monitor all Active Pools to check if the pool is active. You will see the connection pool that you just created appear in the Monitoring tab.
- Select the Targets tab, and add examplesServer to the Chosen column (in order to assign the connection pool to the server). Then, select Apply to save your changes.
- Set up the data source.
- Select the Data Sources node in the JDBC node. In the right panel, select the Configure a New JDBC Data Source link.
- In the Configuration tab, enter the values in the following fields as follows:
Name: jinfonetDS
JNDI Name: jinfonetDS
Pool Name: jinfonet - Select Create. The new data source will then be added in the Data Sources node in the left panel.
- Select the Targets tab and add examplesServer in the Available column to the Chosen column. Then, select Apply to save the changes.
- Add weblogic.jar to setenv.bat.
To connect via the WebLogic Connection Pool in Logi JReport Designer, you will first need to add weblogic.jar in
<weblogic_install_root>\wlserver6.1\lib
to the ADDCLASSPATH variable of setenv.bat. In this example, supposing that you have installed Logi JReport Designer inC:\Logi JReport\Designer
, and WebLogic inC:\bea
, you will have to modify setenv.bat inC:\Logi JReport\Designer\bin
to addC:\bea\wlserver6.1\lib\weblogic.jar
to the ADDCLASSPATH variable as follows:set ADDCLASSPATH=%JAVAHOME%\lib\tools.jar;C:\bea\wlserver6.1\lib\weblogic.jar;
- Set up the connection.
- Start Logi JReport Designer and open the catalog.
- In the Catalog Manager, right-click the node of the default data source and select New JDBC Connection from the shortcut menu. Select JDBC in the Select Connection Type dialog.
- In the Get JDBC Connection Information dialog, check Use Connection Pool. The string weblogic.jinfonet.pool.Driver will automatically be displayed in the Driver text field.
- Fill in the URL jdbc:weblogic:jinfonet:@<hostname>:7001:jinfonetDS, where @<hostname> is the host name or IP address of the WebLogic Server, 7001 is the port on which the WebLogic Server listens, and jinfonetDS is the JNDI Name of the data source. Then, select OK.
Note: The data types longbarbinary and BigDecimal are not supported when a WebLogic Connection Pool is used.