Chapter 4 Backing Store Tutorial : Add a JDBC Connection Resource

Add a JDBC Connection Resource
In this task, you will add a JDBC Connection resource to your project and configure it to connect to the backing store database. Details below explain how to connect to a local instance of Oracle 10g Express Edition database. Adapt the instructions as needed for your database product.
1.
Start TIBCO Designer and from the Project menu, select Open Existing Project. Do one of the following:
Open the FDCache project you configured using Chapter 3, Cache Object Management Tutorial.
      BE_HOME/examples/FraudDetectionwithCache/FDCache
      BE_HOME/examples/FraudDetectionwithBackingStore/FDStore
The rest of the tutorial assumes that the FDCache project is your starting point.
2.
Select Project > Save As. Create a project directory called FDStore somewhere on your computer.
The project directory becomes the project name. All files are copied to this directory.
3.
Open the Shared folder and add a JDBC Connection resource (from the JDBC palette).
4.
In the drop-down list to the right of the JDBC Driver field, select oracle.jdbc.driver.OracleDriver (thin). The driver appears in the JDBC Driver field and in the Database URL field the Database URL format appears as:
jdbc:oracle:thin:@<host>:<port#>:<db_instancename>
In the Database URL field, configure the provided format. For example:
jdbc:oracle:thin:@localhost:1521:XE
Where 1521 is the default port, and XE is the default instance name for Oracle Database 10g Express Edition. (The default instance name for Oracle Database 10g is ORCL).
5.
In the User Name and Password fields, enter the username and password of the database user you created (see Task C, Run the Initialize Database Script to Create the Oracle User). The username and password used in the tutorial are both be_user.
6.
Make sure Oracle is up and running, then click Test Connection. If the details are correct, you see a success message.
7.
Click Apply, then save the project.
8.
You must add this resource to the shared archive. Select the Shared Archive resource (SAR) within the EAR resource. Select the Resources tab, browse to the location of the JDBC Connection resource you just configured, and select it.
9.
Click Apply then click Save to save the project. When you build the EAR file, the JDBC Connection resource is packaged into the shared archive (SAR) file.
10.
Double-click the FraudDetection enterprise archive resource to open it and in the Configuration tab File Location field, change the EAR file name to FDStore.ear and save it somewhere on your computer, for example, C:\temp\FDStore.ear.
11.
Click Apply, click Save, and then click the Build Archive button to build the EAR file.