You declare a data source to store the data that is used
by Decision
Center.
Before you begin
You must have a database to create a data source.
Note: Beginners
who use the Derby embedded database can create the database as part
of this procedure.
For a list of supported databases, see IBM® Support
site.
Procedure
- Register the JDBC driver as a core module.
- Under the <JBOSS_HOME>/modules directory,
create a file path structure. For example, for a Derby
driver, create the following structure: <JBOSS_HOME>/modules/org/apache/derby/main
- Copy the JDBC driver derby.jar file
into the main subdirectory.
- In the main subdirectory, create
a module.xml file. Example for
Derby:
<module xmlns="urn:jboss:module:1.0" name="org.apache.derby">
<resources>
<resource-root path="derby.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
- Launch the JBoss server and run the jboss-cli command
to register the new module in the server. The command is
available in <JBOSS_HOME>/bin.
It must be executed with the name of the new module as follows:./jboss-cli[.sh|.bat]
--connect "/subsystem=datasources/jdbc-driver=derby:add(driver-name=derby,driver-module-name=org.apache.derby)"
- Create the data source.
- Log in to the JBoss Management Console. By default, http://localhost:9990/console.
- Click the Configuration tab.
- Under Subsystems, select
- Click the Datasources panel.
- Click Add, and then enter a name
(for example, DCdatasource) and a JNDI name (java:/jdbc/ilogDataSource)
as the data source attributes.
- Select the JDBC driver to be used for the new data source. The JDBC driver registered as a core module in step 1 should
appear here.
- Specify the connection settings.
- Connection URL
This setting defines the JDBC connection URL. For example: jdbc:derby:c:/dcdb;create=true
- User name and Password
The tags username="dcdbUser" and password="dcdbUser" are
used to access the database.
Tip: If the transaction isolation level
is not set to READ-COMMITTED, you might encounter
database access problems. Configure data source isolation to provide
a better concurrency experience.
- Select the new data source in the table and then click Enable and
then Confirm.