Introduction:
There are many instance when your Application requires JMS connectivity. If you are using WebSphere application server then along with deploying your application, you can also use out of the box JMS feature available with WebSphere. You don't need to look for any other external JMS provider.
In this post we will be using Web Sphere Application Server v8.0.0.0 console to create point-to-point queues. We will see the configuration of:
- Bus
- Destination
- Queue Connection Factory
- Queue
Steps to create Bus and Destination:
1. Login to WebSphere console
2. First of all you need to create a service integration bus. A service integration bus is a group of one or more application servers or server clusters in a WebSphere Application Server cell that cooperate to provide asynchronous messaging services. The application servers or server clusters in a bus are known as bus members. In the simplest case, a service integration bus consists of a single bus member, which is one application server.
Go to "Service Integration > Buses" and click “New” to create a new Bus
3. Enter the name of the bus and click “Next”.
For simplicity, we will not enable bus security in this post. If your requirement is to do so then further steps might differ/change
4. Click “Finish” to create the bus
5. Click on “Save” to complete the process and create the bus
6. Click on the name of the bus which you have created
7. Bus configuration window will be opened. Give the 'Description' of the Bus.
Then on right hand side window
go to “Destination resources > Destinations” to create the Destination
8. Bus destination window will be opened for Destination Queue Configuration. Click on "New..."
9. Here we will use Queue as Destination Type. Select “Queue” as destination type and click “Next”
10. Enter the “Identifier” as your destination queue name and its “Description”. Click “Next”
11. Select the Bus member from the drop down to assign the queue to the a bus member. Click “Next”
12. Summary of newly created queue will be displayed. Review and click on "Finish"
13. You will get option to Save or Review the changes. After verifying the changes, Click "Save"
14. After saving the changes, go to Bus details page, where you can see the bus previously created
15. Open your bus and go to "Local Topology" tab. Expand your bus and click "Add..."
16. Select the "server" option and select your server from the drop down. Click "Next"
17. Select "File store" for message persistence and click "Next"
18. Here you can review and change the file store properties such as log size, log directory, min and max size etc. Click “Next”
19. In the next window you can configure and/or change the Min and Max heap size as per your project need and Click “Next”
20. Summarized details of the queue will be displayed. Click “Finish” to create the queue
21. Click on “Save” to save the changes in the Bus. The messaging engine will be created but might not be started automatically (It can be seen as red cross mark in the screen shot). In that case, we need to restart the application server to start the messaging engine
22. After restarting the WebSphere server, you can go to the same path and check if messaging engine is started or not. If not, then check the logs to triage the issue.
23. With this, we have successfully created a new queue in webserver application server
Steps to create Queue Connection factory:
1. Login to WebSphere application console
2. Go to “Resources > JMS > JMS provider”
3. Select the "Scope" from the drop down and click on “Default messaging provider”
4. Select "Additional Properties > Queue connection factories"
5. You can use the existing queue connection factory or create a new one if needed
6. Click on "New" button to create a new connection factory
7. Enter Name, JNDI Name, Description and Bus name from dropdown (which was created earlier), and click “OK”
8. "Review" and/or "Save" the changes.
Steps to create Queue:
1. Login to WebSphere application console
2. Go to “JMS providers > Default messaging provider > Queues” and
click “New” to create a new queue
3. Enter the Queue Name, JNDI Name, Description. JNDI Name will be configured and used as Queue in your application. Select the "Bus Name" and "Queue name" values from the drop down. These are the ones we created during Bus and Destination creation
5. Click "OK" and "Save" the changes
You might have to restart your application server once for these changes to take effect.
Also, verify that your application has all the required jars included in class path to make a connection to WebSphere queue.
No comments:
Post a Comment