Quick Start Guide to the IBM Rational Deployment Toolkit for WebLogic Server

This provides instructions for deploying EJBs on a BEA WebLogic Server when using the IBM Rational Deployment Toolkit for WebLogic Server feature.

Table of contents

1. Prerequisites for the IBM Rational Deployment Toolkit for WebLogic Server Feature
2. Steps Required Prior to Starting IBM Rational Developer for WebSphere Software
3. Installing the IBM Rational Deployment Toolkit for WebLogic Server Feature
4. Create a WebLogic Server Runtime
5. Create an EJB Project
6. Create an EJB
7. Validate the EJB Project
8. Update Deployment Descriptors
9. Generate EJB to RDB Mapping
10. Create a Database Schema and Tables
11. Create a Domain Configuration
12. Create a Server
13. Define a Connection Pool and Data Source
14. Add the EAR Project to the Server
15. Running and Testing an Enterprise JavaBean
16. Known Issues

1. Prerequisites for the IBM Rational Deployment Toolkit for WebLogic Server Feature

  1. IBM Rational Web Developer for WebSphere Software 6.0.0.1.
  2. BEA WebLogic Server 8.1 SP3, 7.0 SP5, 6.1 SP7 (not supported on Windows XP). These must be installed locally even if the target deployment server is not local.
  3. Windows 2000, Windows XP.

2. Steps Required Prior to Starting IBM Rational Developer for WebSphere Software

  1. For DB2 database users, update the PATH environment variable if not already set (for example, add C:\Program Files\IBM\SQLLIB\BIN and C:\Program Files\IBM\SQLLIB\java).

3. Installing the IBM Rational Deployment Toolkit for WebLogic Server Feature

  1. Start IBM Rational Developer and open the Install/Update wizard (Help > Software Updates > Find and Install).
  2. Select Search for new features to install and click Next.
  3. You will be using either a remote IBM Rational update site or an archived site from a zip file to install the IBM Rational Deployment Toolkit for WebLogic Server feature.
  4. In the list of sites to search, check the newly added site and click Next.
  5. In the list of features to install, check IBM Rational Deployment Toolkit for WebLogic Server and click Next.
  6. Review and then accept the license that is shown. It must be accepted to complete the install. Click Next to continue to the next page.
  7. Click Finish to start the install process.
  8. The Feature Verification page will identify that the JAR files in the update site have not been signed; this is expected. Click Install to complete the install process.
  9. Allow IBM Rational Developer to restart when prompted.

4. Create a WebLogic Server Runtime

After IBM Rational Developer has restarted, you can create a runtime for a BEA WebLogic Server.

  1. From the menu, go Window > Preferences > Server > Installed Runtimes to open the Server Runtimes page.
  2. Click Add to open the Server Runtime wizard.
  3. Select the desired version of WebLogic Server, for e.g. BEA WebLogic Server v7.0, and click Next.
  4. Enter the appropriate paths and click Finish.

5. Create an EJB Project

  1. Switch to the J2EE perspective.
  2. Select File > New > EJB Project.
  3. Click Show Advanced if the advanced details are hidden.
  4. Enter an EJB project name. Use the default EAR project name setting or define a new one.
  5. Set the EJB version to 2.0 and select a WebLogic Server as the Target server.
  6. Uncheck Create an EJB Client JAR Project as this is not required.
  7. Click Finish to complete the EJB project creation.
  8. After creating an EJB project, it is recommended you turn off automatic validation due to performance issues (Window > Preferences > Validation).

6. Create an EJB

  1. Select File > New > Enterprise Bean to create an EJB.
  2. Select your EJB project if not already selected.

Create a Session Bean:

  1. Select Session bean and enter a Bean name.
  2. Define com.ibm.test as the Default package.
  3. Click Next. Check the Local client view check box if required.
  4. Click Finish to complete the Session Bean creation.

Create a CMP 2.0 bean:

  1. Select Entity bean with container-managed persistence (CMP) fields. Ensure CMP Version is 2.x.
  2. Enter a Bean name and define com.ibm.test as the default package.
  3. Click Next. Check the Remote client view check box if required. The remote interface defines the business methods that can be called by a client.
  4. Create additional persistence fields by clicking the Add button.
  5. Click Finish to complete the CMP bean creation.

7. Validate the EJB Project

  1. In the Project Explorer view, expand the EJB project. A folder wls81, wls70, or wls61 is created containing the deployment descriptors specific to BEA WebLogic Server.
  2. Right-click on the EJB project and select Run Validation to invoke the ejbc tool to validate and generate code. The console should display ejbc successful.

8. Update Deployment Descriptors

  1. In the Project Explorer view, right-click on the EJB project and select Open With > Deployment Descriptor Editor.
  2. View the WebLogic page (e.g. WebLogic 7.0).
  3. Select the CMP bean and enter the Data Source Name Test.
  4. Enter the Bean's JNDI name. The JNDI name field is the value you will use for lookups in the Universal Test Client. Those values should already be populated.
  5. Save the editor.

9. Generate EJB to RDB Mapping

  1. In the Project Explorer view, right-click on the EJB project and select EJB to RDB Mapping > Generate Map.
  2. Select Create a new backend folder and click Next.
  3. Select Top Down and click Next.
  4. Select your database from the Target Database drop-down list (e.g. DB2 Universal Database V8.1).
  5. Enter SAMPLE as the Database name and ensure Generate DDL is checked.
  6. Click Finish.

10. Create a Database Schema and Tables

  1. In the Project Explorer view, the generated DDL script is found under the EJB project as ejbModule/META-INF/Table.ddl.
  2. Run the DDL script against your target database to create the tables and associations.

11. Create a Domain Configuration

Note: The following instructions are specific to WebLogic Server 7.0, however, the overall steps can also be used for WebLogic Server 6.1 and 8.1. Refer to the WebLogic documentation for further information.
  1. Go to Start > Programs > BEA WebLogic Platform 7.0 and select Domain Configuration Wizard.
  2. Select the template WLS Domain.
  3. Enter the domain name testdomain and click Next.
  4. Select Single Server and click Next.
  5. Specify a domain directory and click Next.
  6. Enter the server name testserver and click Next.
  7. Enter a User Name and Password, and then proceed to create the domain.

12. Create a Server

  1. In the J2EE perspective, open the Servers view.
  2. Right-click within the view and select New > Server.
  3. In the Server type field, select WebLogic v7.0 Local Server (the version of testdomain) (or WebLogic v7.0 Remote Attach Server if you plan to run on a remote server). Click Next.
  4. Enter the domain name testdomain. The server name testserver should appear.
  5. Enter the Server Administrator Username and Password.
  6. Click Finish to create the server.

13. Define a Connection Pool and Data Source

Note: The following instructions are specific to WebLogic Server 7.0, however, the overall steps can also be used for WebLogic Server 6.1 and 8.1. Refer to the WebLogic documentation for further information.
  1. In the Servers view, double-click WebLogic v7.0 Local Server @ localhost to open the Server Editor.
  2. In the Classpath page, click Add External Jars to add database JARs of the server you are running. For DB2 users, add C:\Program Files\IBM\SQLLIB\java\db2java.zip (and C:\Program Files\IBM\SQLLIB\java\db2jcc.jar for DB2 8.1) to the classpath.
  3. Save the editor and start the server.
  4. Once the server is started, click Launch WebLogic Server console from the Overview page of the Server Editor.
  5. Enter the Server Administrator username and password defined previously.
  6. Under the Services Configurations section, click Connection Pools to configure a new connection pool as shown below. In the example, the database is DB2 and the database name is SAMPLE.
  7. Click Create and then select the Targets tab to enable the connection pool testPool for the target server testserver.
  8. Navigate back to the homepage by clicking the Home icon in the top-right corner of the page.
  9. Under the Services Configurations section, click Tx Data Sources to configure a new JDBC TX Data Source.
  10. The Data Source Name field in the EJB project's Deployment Descriptor editor (previously defined in Section 8) must match the JNDI name of the data source defined below.
  11. Click Create and then click the Targets tab to enable the Tx Data Source Test for the target server testserver.
  12. Close the WebLogic Server console.

14. Add the EAR Project to the Server

  1. In the Servers view, right-click on WebLogic v7.0 Local Server @ localhost and select Add and remove projects.
  2. Select the EAR project and click Add to configure it to the server.
  3. Click Finish.

15. Running and Testing an Enterprise JavaBean

  1. In the Project Explorer view, right-click on the EJB project and select Run > Run on Server. This will start the WLS server and launch the Universal Test Client. There is no need to generate deploy code in the Run on Server step for EJB projects since validation already generated the deploy code.
  2. In the Universal Test Client, view the JNDI Explorer page and enter the JNDI name for the session bean and/or CMP bean to perform a JNDI lookup.

16. Known Issues

This list contains known issues and limitations at release time. Bug tracking numbers follow in brackets [].

Server Configurations

  1. Reusing WebLogic domains for server configurations or sharing domains among more than one server configuration is not recommended, as it will cause publishing and deployment problems. [1737]
  2. Using the WebLogic administration console to remove applications deployed with IBM Rational Developer will cause publishing and deployment problems. [1655]
  3. The WebLogic Domain Configuration Wizard only runs in GUI mode on some Unix systems. It has been tested using the TWM window manager with the GNOME desktop on Red Hat Linux 7.2. [4304]

Publishing to Server

  1. The server synchronization state will still read 'Synchronized' if a change is made to a project that is associated with a server configuration. The state only changes if the server configuration itself needs to be republished. [1156]
  2. The server publish preferences should be set to use Publish All or Smart Publish. Prompt user publishing method does not work. [2670]
  3. Unable to deploy application because of FileNotFoundException META-INF/ejb-jar.xml not found in jar. Actually caused by concurrent access problem when a deploy, redeploy, or undeploy action is interrupted by another action or a shutdown. [1639, 1700]
  4. Unable to redeploy EAR after adding an EJB while the server is running. [3996]

Server Startup

  1. WebLogic Server 6.1 is not supported on Windows XP due to issues with authentication. [7491, 7408, 7382, 7381]
  2. WebLogic Server 6.1 stays in "Starting" state and never progresses to "Started" on Windows NT. Upgrade to WebLogic Server 6.1 SP4.
  3. An UnavailableException may occur when the server is started if a client attempts to access the web container before it is fully initialized. May cause problems for Run on Server which causes a server restart. A subsequent Run on Server should succeed. [2446]
  4. The error message 'found no context for "/"' will appear if no web application was deployed and bound to the default context. [4013]
  5. WebLogic Server will not start if the PATH system environment variable is too long (greater than 1024 characters). [2420]
  6. Restarting a local WebLogic Server 6.1 while it is running does not work. The workaround is to check the debug view to ensure the server process is terminated before restarting the server. [4056]
  7. An enterprise application project with a different server runtime version than the WebLogic server can incorrectly be configured to the server by "Run on Server". [7475]

Server Editor

  1. Cannot undo port number changes if the port number is invalid (must be a positive integer or –1; 0 is not allowed). [1652]
  2. You are asked to save changes to the EJB Deployment Descriptor Editor or the Server Editor after adding/removing an enterprise application to a server and publishing the server. [6064]

EJB to RDB Mapping

  1. EJB Deployment Descriptor editors and EJB to RDB Mapping editors sometimes open in the dirty state. This indicates that the model loaded in memory has been modified in some way. Save the editor to avoid any potential model synchronization problems. [1647, 2490]
  2. The scenario of generating a top-down map, then using the tables created by the Mapping Editor's generated DDL to do a bottom-up mapping is unsupported. The toolkit will incorrectly fill out the tag in weblogic-cmp-rdbms-jar.xml. [4931]

EJB Management

  1. An exception occurs when importing an EAR that contains both a Web project and an EJB project with an EJB. [7486]
  2. Adding and removing beans from an EJB module may fail to synchronize the WebLogic-specific descriptors if the enterprise application has been recently removed from a server configuration. [3400, 3453, 3454]
  3. When removing a CMP field from a CMP 1.1 bean in an EJB 2.0 module, a weblogic-cmp-rdbms-jar.xml with no beans is incorrectly created and the CMP field is not removed from weblogic-cmp11-rdbms-jar.xml. [4353, 6061]
  4. An exception occurs when creating a CMP 1.1 bean in an EJB 2.0 project. [7406]

Universal Test Client (UTC)

  1. Local home interface lookup in WebLogic Server 8.1 and 7.0 does not work in the Universal Test Client due to the way JNDI is implemented in WebLogic Server. [1631]
  2. JNDI navigation via hyperlinks in the JNDI Explorer is not supported due to the difference in WebLogic Server's implementation of JNDI. To use the JNDI Explorer, perform a lookup on the fully-qualified JNDI name.
  3. If the server is republished while the Web browser is open to the Universal Test Client, it must be reinitialized by performing a Run on Server or manually setting the JNDI properties. [2362]

JSP Debugging

  1. Stepping over JSP lines is limited to JSP scriptlet and JSP declaration code. [3987]
  2. Stepping in and out of JSP lines outside of JSP scriptlet and JSP declaration code is not supported.
  3. The debugger will not be able to identify the sources for JSPs when debugging if a situation causes the server to change state to "needs republish", such as modifying sources in the deployed application. [4058]

EJB Validation

  1. Server projects need to auto-validate in order for the WebLogic Server Configuration Validator to provide useful warning messages when applications are not fully enabled for WLS. [1740]
  2. EJB inheritance is not supported in WebLogic Server but it passes ejbc validation. [7402]
  3. After deleting CMP 1.1 beans from an EJB 2.0 project, a weblogic-cmp11-rdbms-jar.xml is incorrectly created after validation. [6062]

CMR

  1. WAS EJB 1.1 relationships: Creating WAS EJB 1.1 relationships in a WebLogic-enabled EJB project will cause resource save problems. [2331]
  2. EJB 2.0 relationships: Relation with two identical relationship role names is allowed. [1643]

Scenario Applications

  1. YourCo scenario may have problems with a TLD. To resolve the problem edit the taglib.tld file in WEB-INF/lib/jspsql.jar, removing all the empty <teiclass> tags. Re-package and re-deploy the application. [2347]

DDConverter

  1. DDConverter is unable to convert an EJB JAR that contains both CMP and BMP beans. The workaround is to have CMPs and BMPs in separate EJB modules. [4235]
Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.