In the Name field, enter a name for the foreign server, and then click Finish.

8-46 Oracle Fusion Middleware Users Guide for Technology Adapters ■ ConnectionFactory ■ XAQueueConnectionFactory ■ XATopicConnectionFactory ■ XAConnectionFactory

6. Click OK.

Adding Destinations to the AQJMS Foreign Server To add destinations to the AQJMS foreign server:

1. Click the Destinations tab in the Settings for Foreign Server Name page.

2. Click New and specify a name for this destination. This is a logical name that will

be referenced by the Oracle WebLogic Server and has nothing to do with the destination name.

3. In the Local JNDI Name field, enter the local JNDI name you would use in your

application to look up this destination.

4. In the Remote JNDI Name field, enter Queuesqueue nameif the destination

is a queue, or enter Topicstopic name if the destination is a topic.

5. Click OK.

6. Restart the Oracle WebLogic Server Administration Console. You have configured AQJMS in an Oracle WebLogic Server.

8.4.8.1.2 Creating Queues in Oracle Database

To create queues: 1. Run the setup_user.sql script. 2. Run the create_start_queues.sql script. These scripts are located in the adapters-jms-108-aqjms-textmessageusingqueues sample artifactssql directory. You can obtain the adapters-jms-108-aqjms-textmessageusingqueues sample by accessing the Oracle SOA Sample Code site, and selecting the Adapters tab.

8.4.8.2 Create an Application Server Connection

You must establish connectivity between the design-time environment and the server you want to deploy to. Perform the steps mentioned in Section 2.7, Creating an Application Server Connection for Oracle JCA Adapters to create an application server connection.

8.4.8.3 Creating an Application and an SOA Project

You must create an JDeveloper application to contain the SOA composite. Use the following steps to create a new application and an SOA project: 1. Open JDeveloper.

2. In the Application Navigator, click New Application. The Create Generic

Application - Name your Application dialog is displayed.

3. Enter a name for the application in the Application Name field. For example,

AQQueue2Queue. Oracle JCA Adapter for JMS 8-47

4. In the Application Template list, choose Generic Application.

5. Click Next.

The Name your project page is displayed.

6. In the Project Name field, enter a descriptive name. For example,

AQQueue2Queue.

7. In the Available list in the Project Technologies tab, double-click SOA to move it

to the Selected list.

8. Click Next. The Create Generic Application - Configure SOA Settings page is

displayed.

9. Select Composite With BPEL from the Composite Template list, and then click

Finish . You have created a new application and an SOA project. The Create BPEL Process page is displayed.

10. Enter a name for the BPEL process in the Name field.

11. Select Define Interface Later in the Template list, and then click OK.

You have created a BPEL process. The AQQueue2Queue application, the AQQueue2Queue project, and the SOA composite appear in the design area. 12. Copy the expense.xsd file to the XSD folder in your project. This file is located in the adapters-jms-108-aqjms-textmessageusingqueues sample artifactsschemas directory. You can obtain the adapters-jms-108-aqjms-textmessageusingqueues sample by accesing the Oracle SOA Sample Code site, and selecting the Adapters tab.

8.4.8.4 Creating an Inbound Adapter Service

Perform the following steps to create an adapter service to dequeue the message to a queue:

1. Drag and drop JMS Adapter from the Service Adapters list to the Exposed

Services swim lane in the composite.xml page. The Adapter Configuration Wizard Welcome page is displayed.

2. Click Next. The Service Name page is displayed.

3. Enter Inbound in the Service Name field, and click OK. The JMS Provider page is

displayed.

4. Select Oracle Advanced Queueing in the Oracle Enterprise Messaging Service

OEMS box, and click Next. The Service Connection page is displayed. 5. Select the connection created in Section 8.4.5.2, Creating an Application Server Connection.

6. Click Next. The Adapter Interface page is displayed.

7. Select Define from operation and schema specified later, and click Next. The

Operation page is displayed.

8. Select Consume Message, and click Next. The Consume Operation Parameters

page is displayed.