Server User Manual

Table Of Contents
Chapter 8: Using JBuilder with IBM WebSphere servers 75
Selecting a server
Add An Administrative Scripting Item To The Enterprise Menu: Checking this
check box adds the WebSphere Administrative Scripting item to JBuilders
Enterprise menu so you have quick access to this tool from the JBuilder IDE.
This step is optional. Click the CMP Mapping button to display the CMP Mapping
page. Use this page to view and possibly change the container-managed
persistence (CMP) mappings JBuilder uses. By examining the tables on this
page, you can see the mappings JBuilder is using. Usually you will not need to
change any of these mappings, especially if you are using the more common
database drivers. You can, however, edit these mappings if you are using other
drivers, want to do your own type mappings, and so on. For more information
about editing mappings and aliases, click the Help button.
6 Choose OK to close the dialog box and configure JBuilder.
When you configure JBuilder to target a WebSphere server, required libraries are
created for you. To see a list of the WebSphere libraries, see The created libraries on
page 23.
Selecting a server
If you are working with more than one version of WebSphere Application Server and
have configured JBuilder for all versions, you must select which version you want to
use for your current project. Choose Project|Project Properties and choose Server.
See Selecting a server on page 24 for more information.
Generating WebSphere deployment descriptors for WebSphere 4.0
When you are using the Enterprise JavaBean 1.x wizard or the EJB 1.x Entity Modeler
to create entity beans that target WebSphere 4.0 Advanced Edition, the wizards do not
generate the
Map.mapxmi and Schema.dbxmi deployment descriptors. When you build
your bean, EjbDeploy, which is called during the build process, will generate them for
you. You can then modify the mapping and run Make again to keep the mapping in the
JAR.
If youve used the Entity Modeler to create your entity beans and the field names in
your bean dont map directly to columns in the database, you can choose to have
JBuilder create WebSphere CMP deployment descriptors that override the default
EjbDeploy behavior:
1 Right-click the EJB module node in the project pane when WebSphere 4.0
Advanced Edition is your selected server.
2 Choose Properties on the context menu.
3 Select the Build|WebSphere page.
4 Check the Generate CMP Descriptors check box.
5 Make your changes:
The list of Data Mapping Files contains the default mapping files that are used to
map Java primitive types to database types. You can modify, add, and remove
mapping files. The Database Type Substitution In Generated Descriptors list
displays the substitutions JBuilder makes if the Java primitive types cant be directly
mapped to a type in the database. You can modify this list. For example, you might
want another Java type to be substituted for a particular original type in a specified
database. Or you can add additional substitutions to the list.
6 Click OK.
When you compile your bean, the two deployment descriptors (
Map.mapxmi and
Schema.dbxmi are generated for entity beans with container-managed persistence for