Server User Manual

Table Of Contents
26 Developing Applications for J2EE Servers
Setting up JDBC drivers
Data Source information is persisted in config.xml. DataSource entries are
removed when the server shuts down.
Do Not Map Project Data Sources: Does not map any data sources.
Note that JBuilder also adds the JDBC driver (if it can be located in the
projects required libraries) to the servers classpath at start up time. All data
sources created by JBuilder are transactional data sources.
5 If you want to make changes to the configuration settings for the server
selected for the service, click the ellipsis () button and edit the settings you
want on the General and Custom pages. Click OK.
6 Repeat these steps for each service you want access to.
4 Click OK.
If you neglect to select one ore more servers for a project, the Server page of the
Project Properties dialog box appears when you start an EJB wizard from the object
gallery. All EJB projects must have one or more selected servers.
Setting up JDBC drivers
To enable JBuilders EJB wizards and EJB designer to access a database, you must
install the JDBC driver supplied by the database vendor and set up the driver in
JBuilder. Install a JDBC driver following the vendors instructions.
To begin setting up the driver in JBuilder, select Enterprise|Enterprise Setup to display
the Enterprise Setup dialog box. Select Database Drivers in the tree to display the
Database Drivers page. Use this page to add a new database driver to JBuilder. See
the following section for step-by-step instructions.
Creating the .library and .config files
There are three steps to adding a database driver to JBuilder:
1 Creating a library file which contains the drivers classes, typically a JAR file, and
any other auxiliary files such as documentation and source.
2 Deriving a .config file from the library file which JBuilder adds to its classpath at
start-up.
3 Adding the new library to your project, or to the Default project if you want it
available for all new projects.
The first two steps can be accomplished from the Database Drivers page:
1 Open JBuilder and choose Enterprise|Enterprise Setup. Click the Database Drivers
tab which displays .config files for all the currently known database drivers.
2 Click Add to add a new driver, then New to create a new library file for the driver.
The library file is used to add the driver to the required libraries list for projects.
Note You can also create a new library under Tools|Configure|Libraries, but since you
would then have to use Enterprise Setup to derive the .config file, it is simpler to do
it all here.
3 Type a name and select a location for the new file in the Create New Library dialog
box.
4 Click Add, and browse to the location of the driver. You can select the directory
containing the driver and all its support files, or you can select just the archive file
for the driver. Either will work. JBuilder will extract the information it needs.