This chapter provides an example for creating an OracleAS adapter for SQL Server. To work with an OracleAS adapter for SQL Server, you must also configure either a BPEL process or a Mediator process. For information on using BPEL or Mediator, see Creating the Project in JDeveloper Examples.
To work with the OracleAS Adapter for SQL Server and create outbound interactions, you must create a new SQL Server database and use the data to create a CDC Solution.
To create an SQL Server data source you must do the following:
In your SQL Server database, you should create a database called Hospital. In this database create the following tables and columns as described in Table 4-1.
You begin by configuring access to the Windows computer with your SQL Server data. You configure this access with Oracle Connect. Open Oracle connect and follow the directions Setting Up a Windows Computer in Oracle Studio. Enter the following information in the Add machine dialog box:
Host name/IP address: Enter the name or IP address for the Mainframe computer with the Hospital database. This should be installed in the same directory as Oracle Connect.
Port: Enter the port number where the daemon is running. The default port is 2551.
Display name: You do not need to enter any information in this field (By default, the display name is the host name and the port number).
User name: If the computer you are accessing needs an administrator password. If so enter the name o f the computer's administrator.
Password: If necessary, enter the computer administrator's password.
Connect via NAT with fixed IP address: Select this if the machine uses the NAT (Network Address Translation) firewall protocol, with a fixed configuration, mapping each external IP to one internal IP, regardless of the port specified.
Figure 4-1 shows the Add Machine dialog box with the correct information:
You now create the change data capture for the tables you created. When you are finished you can create WSDL and binding (jca) files. See Create the JCA Configuration Files for more information.
These files contain the information needed to create the BPEL and Mediator projects in JDeveloper. For more information on using JDeveloper for the BPEL Process Manger and Mediator, see Creating the Project in JDeveloper Examples.
Before you begin to set up your change data capture ensure the SQL Server is set up to handle a change data capture. For information on how this is done see these topics.
The following sections describe how to create a change data capture in Oracle Studio.
The following procedure describes how to set up your change data capture for this sample. For detailed information on setting up a change data capture for SQL Server, see Setting up a Change Data Capture in Oracle Studio.
Open the Solution perspective in Oracle Studio.
In the left pane, click Create new project.
Enter the following:
Project name: Hospital
Type: SQL Server
Figure 4-2 shows the correct data in the Create new project screen.
Click Design and then click Next and Finish to use the default values in the screens. If you want to set up your staging area on a UNIX computer, then you must change that setting in the second screen. For more information, see Create a CDC Project.
Click Implement to go to the Implementation guide.
For Server Configuration, enter the following information:
Machine: Enter the information for the Windows computer with Oracle Connect installed.
Data Source: Enter the following:
SQL Server Name: Enter the name of the Hospital SQL Server database that you created for this project.
dbName: Enter the name of the server computer where the SQL Server is installed.
For more information, see Set up the Data Source.
Stream Service: You can use the default settings, which records all changes to the journal and does not include the capture of before-image records.
Note: You must ensure that you enter the path to the Transient Storage Directory. This must be in the same location as defined in the
transientStorage parameter. See Configuring the Template Input File for more information.
Logging Level: Use the default settings.
For CDC Service Configuration, enter the following information:
Machine: Enter the information for the computer you are using as your staging area. This must be a Windows or UNIX machine.
Stream Service: Enter the following:
In the Staging Area screen, enter a location for the change files on the computer you specified and the Staging Area computer.
In the Changed Data Capture Table Selection, select all of the tables.
In the remaining screens, click Next to use the default values.
Access Service Manager: Click Next in all of the screens to use the default values.
For more information, see Set up the Staging Area Server.
You must now Deploy the Solution.
To deploy the solution, click Activate Workspaces. Click OK in any screen that opens. If you get a message about a naming collision, you must resolve this first.
For information on deploying a change data capture, see Deploying a Change Data Capture.
You must create both a WSDL and JCA file to set up your connection with JDeveloper. You create the files using Oracle Studio before setting up the BPEL process or Mediator connections.
For information on how to create JCA configuration files, see Creating JCA Configuration Files. To create the files for the
Hospital_CDCQueue adapter, do the following:
From the Configuration pane in Oracle Studio, expand the binding for the CDC staging area that you created. The name of the binding is the Project name for the CDC solution that you created in Oracle Studio with the suffix
Hospital_CDCQueue adapter and select Generate JCA Configuration Files.
Save the files to a place you can find when you create the BPEL process or Mediator connection.