I was working on one of the requirement in which we have to communicate third party application using JMS queues. We are using oracle application gateway as a inbound/outbound interface so all the communication done through OAG, so in this case we are using JMS configured on oracle application gateway. Well in this blog post I am not going to describe my usecase but I will describe the basic step required to enable JMS in oracle application gateway (OAG).
Scenario:
I am going to enable jms in OAG first. I will create two queues incoming and outgoing. OSB application put the data on to incoming queue then jms listener in oag listen this incoming queue and put the data on outgoing queue. Well I am just showing here how to create a api gateway policy for jms communication so I am not going to tell how to configure your osb application to put the data on incoming (I hope you all know how to configure that).
Steps require to enable JMS in OAG:
Enable Embedded Active MQ on OAG
Create JMS Service External Connection in OAG
Scenario:
I am going to enable jms in OAG first. I will create two queues incoming and outgoing. OSB application put the data on to incoming queue then jms listener in oag listen this incoming queue and put the data on outgoing queue. Well I am just showing here how to create a api gateway policy for jms communication so I am not going to tell how to configure your osb application to put the data on incoming (I hope you all know how to configure that).
Steps require to enable JMS in OAG:
- Enable Embedded Active MQ on OAG
- Create JMS Service External Connection in OAG
- Create Queue in OAG Embedded Active MQ
- Create OAG outgoing policy
- Create JMS listener in OAG
- Configure Embedded Active MQ jms connection on osb server
- Test application
Enable Embedded Active MQ on OAG
- Open policystudio --> go to server setting --> Messaging --> Embedded Active MQ -> configure as below
- Check the box Enable Embedded Active MQ Broker
- Active MQ connection details.
- Address - localhost
- Port: 62626
- username: weblogic
- password: welcome1
- Apply changes.
Create JMS Service External Connection in OAG
- Expand External Connection --> JMS Service --> Add a JMS Service
- JMS service Connection Details
- Name: Embedded OAG JMS Service
- Provider url : tcp://localhost:62626
- Initial Context Factory : org.apache.activemq.jndi.ActiveMQInitialContextFactory
- Connection Factory : QueueConnectionFactory
- Username : weblogic
- Password : welcome1
- Click Ok. Deploy your configurations.
Create Queue in OAG Embedded Active MQ
- open url : https://localhost:8090 in browser
- Go to Messaging --> Queues --> Actions --> Create Queue
- create two queues i.e. InQueue and OutQueue.
Create OAG outgoing policy
- Under policies --> create a policy container name "JMS Policies"
- Create policy i.e. "OAG Outgoing"
- Drag and drop messaging system from the Routing menu (from right panel)
- Configure as below:
- Click Ok to create a policy.
Create JMS listener in OAG
- In the left panel under Listeners --> right click on Oracle API Gateway --> Messaging --> JMS Session, select the jms session you have created before
- Add JMS consumer inside this JMS listener.
- Click ok and deploy.
Configure Embedded Active MQ jms connection on osb server
This step is not require if you are not using osb application to test, you can configure other applicatoin to put the data on the incoming queue so that OAG Policy will work. Well my configurations is like below:
Test the application
Now test your application and check if you are getting the messages in outgoing queue as below :
No comments:
Post a Comment