You are on page 1of 3

10/11/13

Oracle SOA Suite: How to Setup AQ With Examples

Share

More

Next Blog

Create Blog

Sign In

O R AC LE SO A SU I T E

wednesday, march 04, 2009

about me
Kalyan Bitra View my complete profile

How to Setup AQ With Examples


Create User
Login to SQLPLUS using sys as sysdba In the following code you are creating user called "fusiondev" and password "fusiondev" create user fusiondev identified by fusiondev

blog archive
2011 (4) 2010 (1) 2009 (7) September (1) July (1)

Setting Up Basic Privileges


grant resource, connect, create view to fusion dev

June (1) May (1) April (1)

Setting Up AQ Privileges
In the following code you are giving both administrator and user roles to the fusiondev user grant aq_administrator_role and aq_user_role to fusiondev.

March (1) How to Setup AQ With Examples February (1) 2008 (4) 2007 (4)

Setting Up Message Type ( Or Object)


In the following code you are setting up an object with a message strcture of MessageType, and actual Message. This message type can be used further to query the queue to see what message are there etc., but it's not mandatory. create or replace type OrderMsgType as object ( MessageType VARC HAR2(10), Message C LOB );

2006 (1)

labels
11G (5) BPEL (5) SOA (5) weblogic (5) JDeveloper (4) Oracle (3) 10.1.3.4 Patches (2) Database (2) Oracle SOA 11g (2) AQ (1) BPEL Fault Policy (1) BPEL Headers (1) C luster (1) Descriptor (1) Fusion (1) HTTP Authentication (1)
1/3

Create Queue Table


In the following code you are creating a Queue Table called "ORDER_QUEUE_TBL" that there are multiple consumers and the message structure is of "OrderMsgType" which you creaated above. BEGIN DBMS_AQADM.C REATE_QUEUE_TABLE( queue_table => 'fusiondev.ORDER_QUEUE_TBL', multiple_consumers => TRUE, queue_payload_type => 'OrderMsgType'
oraclesoa.blogspot.in/2009/03/how-to-setup-aq-with-demos-and-examples.html

10/11/13

Oracle SOA Suite: How to Setup AQ With Examples

);

High Availability (1) MDS (1) MLR (1) Metadata (1) OC 4J (1) Plugin (1) Schema Print (1) Security (1) WS-Security (1) XE (1) application server (1) connection (1)

Create Queue
In the following code you are creating a Queue Table called "ORDER_QUEUE" and it's tied to ORDER_QUEUE_TBL which you creaated above. DBMS_AQADM.C REATE_QUEUE ( queue_name => 'FUSIONDEV.ORDER_QUEUE', queue_table => 'fusiondev.ORDER_QUEUE_TBL' ); END;

Starting Queue
Here you are starting the queue and ready to be consumed. BEGIN DBMS_AQADM.START_QUEUE('fusiondev.ORDER_QUEUE'); END; Now your AQ is Ready to be published/consumed

oracle links
Oracle SOA Oracle BPEL Oracle WSM (OWSM) BPEL Forum

tools i like
SOAP UI Windows Tail Find Jar

Stopping Queue
Here you are Stopping the queue and ready to be consumed. BEGIN DBMS_AQADM.STOP_QUEUE('fusiondev.ORDER_QUEUE'); END;

other blogs
Vikas Blog C lemens Blog Raynolds Blog

Browse The Queue


Here you are Stopping the queue and ready to be consumed. select * from AQ$ORDER_QUEUE_TBL

links
Webopedia SOA-Wiki

State Of The Message


At any given time the message have different states. We will talk about those in detail later. select MSG_STATE from AQ$ORDER_QUEUE_TBL

Translate
BPEL Process - PublishAQOnDemand
This process creates a message and publishes it to AQ. This message is consumed by two recepients identified as C onsumeAQMessage1 & C onsumeAQMessage2. Download Link

Select Language
Gadgets powered by Google

USA Central

BPEL Process - ConsumeAQMessage1 & ConsumeAQMessage2


These processes consumes the message. Download Link Download Link

HTTP

DNS

Service

Network

Website test tools (?) Pe rform : Website Test From : Se attle Munich

WoW Factor

Brisbane UR L:

Test it
P owered by WebSi teP ul se

Step 1
oraclesoa.blogspot.in/2009/03/how-to-setup-aq-with-demos-and-examples.html 2/3

10/11/13

Oracle SOA Suite: How to Setup AQ With Examples

Now that you have the processes spoon fed to you.. Now create a bpel process consume the message. While defined the adapter in the BPEL Process Designer set the consumer name to "MyAQLearningProcess" and deploy.

Sudoku Play and sharpen your brains!!

Play this free game now!!

Step 2
Then go to BPEL C onsole and click on the Process "PublishAQOnDemand" go to the Descriptor Page you will see something like below.

copyright information
Pictures/C ontents copyrighted by their respective owners

Step 3
Now Add your "MyAQLearningProcess" to the end of the recepientList and click on update descriptor button. So it should look like C onsumeAQMessage1, C onsumeAQMessage2, MyAQLearningProcess

Step 4
Then when you execute "PublishAQOnDemand" Process you will see 3 new instances created. posted by kalyan bitra at 12:33 pm labels: aq, database

1 comment:
george said...
Hi Kalyan, good one. As same can you please give basic steps to create a jms queue. thank you. Regards, Liang Friday, September 18, 2009 at 2:06:00 AM C DT Post a C omment Newer Post Home Older Post

Subscribe to: Post C omments (Atom)

oraclesoa.blogspot.in/2009/03/how-to-setup-aq-with-demos-and-examples.html

3/3

You might also like