BC4J Setup and Deployment Prerequisites for WebLogic Deployment

Before deploying a BC4J project to WebLogic, make sure that your WebLogic server has met the following setup and deployment prerequisites:

Setup Prerequisites

Before you start a BC4J project to be deployed to WebLogic, you must select a connection type and the corresponding SQL dialect, type maps or domains. For instructions, see Understanding Connections, SQL Dialect, Type Maps, and Domains.

Step 1: Verify that all BC4J Runtime libraries are installed

Ensure that the BC4J runtime libraries are installed on WebLogic.

Step 2: Define JDBC Data Sources

Define your JDBC data sources for distributed transactions on WebLogic.

To create a connection pool for an Oracle database, add connection information similar to this sample:


Connection Pool Name : orclConnectionpool
URL : jdbc:oracle:thin:username/password@hostname:1521:orcl
Driver Classname : oracle.jdbc.driver.OracleDriver
Properties : dll=ocijdbc9 protocol=thin

Note: Make sure ORACLE_HOME/bin is in the path. Also, because the URL value is case sensitive, you may wish to test the URL using the JDeveloper Connection Wizard. For more information about using custom JDBC URLs, see the context-sensitive help in the Connection Wizard.

To create a data source, use this sample, and note the connection pool name from the sample above:


Datasource Name : orclDatasource
JNDI Name : jdbc/OracleDS
Pool Name : orclConnectionpool

For more information, see the "WebLogic Server Administration Guide" which can be found at:

http://e-docs.bea.com

Step 3: Start the WebLogic Application Server

Your BEA WebLogic server must be started before you attempt to deploy any J2EE applications. The following is a start WebLogic command script that may help you to run the server:


:runWebLogic
echo on
set PATH=.\bin;%PATH%
set ORACLE_HOME=d:\jdev9i
set BC4J_LIB=%ORACLE_HOME%\bc4j\lib
set DOMAIN_JAR=%ORACLE_HOME%\bc4j\jlib\bc4jdomgnrc.jar
set BC4J_JARS=%BC4J_LIB%\bc4jmt.jar;%BC4J_LIB%\bc4jmtejb.jar;%BC4J_LIB%\collections.jar;%BC4J_LIB%\bc4jct.jar;%BC4J_LIB%\bc4jhtml.jar;%BC4J_LIB%\bc4jimdomains.jar;%BC4J_LIB%\bc4juixtags.jar;%BC4J_LIB%\datatags.jar;%BC4J_LIB%\bc4j_jclient_common.jar
set JDEV_RT=%ORACLE_HOME%\jlib\jdev-cm.jar;%ORACLE_HOME%\jlib\regexp.jar;%ORACLE_HOME%\jlib\share.jar;%ORACLE_HOME%\jlib\uix2.jar
set BC4J_JARS=%BC4J_JARS%;%DOMAIN_JAR%
set OTHER_JARS=%ORACLE_HOME%\lib\xmlparserv2.jar;%ORACLE_HOME%\jdbc\lib\classes12.jar;%ORACLE_HOME%\ord\jlib\ordhttp.jar;%ORACLE_HOME%\ord\jlib\ordim.jar
set ORACLE_CLASSPATH=%BC4j_JARS%;%JDEV_RT%;%OTHER_JARS%
set JBO_JAVA_OPTS=-Djbo.debugoutput=console -Djbo.use.pers.coll=false -Djbo.SQLBuilder=SQL92
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;%ORACLE_CLASSPATH%;%CLASSPATH%
echo off
echo.
echo ***************************************************
echo * To start WebLogic Server, use the password *
echo * assigned to the system user. The system *
echo * username and password must also be used to *
echo * access the WebLogic Server console from a web *
echo * browser. *
echo ***************************************************

Deployment Prerequisites

Step 1: Create an application server connection(s)

Create an application server connection to BEA WebLogic. When you do this, you specify the location of the weblogic.jar file in your WebLogic installation directory.

Step 2: Create a Business Components for Java project

You'll need to create a BC4J project using the Business Components Package Wizard.

Step 3: Define Business Component Runtime Properties for Web Applications

For web application deployments, make sure that the server connection information to connect to deployed business components is properly configured in the bc4j.xcfg file. This file defines all of the deployment configurations of a particular application module in the business components project and permits data tags and data web beans to access a specific view object belonging to the application module.

See About BC4J Configuration Properties and Defining BC4J JSP Runtime Properties in the bc4j.xcfg File for more information.

Step 4: Deploy bc4j.ear to WebLogic

When deploying BC4J web application applications, make sure that the bc4j.ear file is deployed to your WebLogic application server. This file contains the required web application and UIX files required for deployment. You only need to perform this task one time (not every time a BC4J web application is deployed).

In the Navigator, right-click bc4j.ear on the Navigator (below WAR_dep_profile_icon <projectname_jpr_War.deploy>) and choose Deploy to <WebLogic_application_server_connection>.

(Optional: Running and deploying BC4J JSPs only) Copy ordhttp.jar to WebLogic's Classpath

If you are running or deploying BC4J JSPs, copy ordhttp.jar to WebLogic's classpath. HtmlServices uses classes inside ordhttp.jar to process multi-part HTTP requests for update and insert. This file is located in:

<jdev_install>/ord/jlib

Related topics

About Business Components for Java (BC4J) Deployment
Creating Deployment Profiles (.bcdeploy) for BC4J Applications
Creating weblogic-ejb-jar.xml