16.3. Switching to a Production Database
- Apache Ant must be installed.
- The database that you wish to use must already exist.
- A user with permission to make changes to that database must already exist.
- The JDBC driver JAR file for the database must be in the server configuration's
Back Up Your Server ProfileMake a copy of the server profile for which you plan to configure your database as the Database Configuration Tool modifies the configuration settings.
cp -R JBOSS_HOME/jboss-as/server/Profile /path/to/backup/folder.
Run the Database Configuration ToolChange to the directory containing the Database Configuration Tool script:
Run Apache AntRun the
antcommand to launch the script.
Enter DataFollowing the prompts, enter the following information as it is requested:
- the type of database being used,
- the name of the database,
- the host name or IP Address of the database,
- the TCP port being used for the database,
- the user name needed to access the database, and
- the password for the user account.
NoteYou could also add these values directly to the
build.propertiesfile (found in the same directory) before running the script. The Database Configuration Tool will not prompt you for these properties if it finds you have already added them to the file.
The Database Configuration Tool updates the relevant configuration files and exits. JBoss Enterprise Application Platform is then reconfigured for use with the production database.