This tutorial assumes that you already have glassfish installed and running on your local machine.
1.) To check the default setting of your JMS broker navigate to Configurations->server-config->Java Message Service->JMS Hosts->default_JMS_host.
2.) Create JMS Connection Factory by navigating to Resources->JMS Resources->Connection Factories. For example if we want to add a jms queue factory click New and fill the ff details:
Pool Name: ipielPool
Resource Type: javax.jms.QueueConnectionFactory
Leave everything as default
Click Ok
3.) Then create a JMS queue by navigating to Resources->JMS Resources->Destination Resources, select New and fill the ff details:
JNDI Name: jms/IpielQueue
Physical destination name: jmsIpielQueue
Resource Type: javax.jms.Queue
Leave everything as default
Click Ok
Now you have successfully setup a JMS Queue broker which you can use to send and receive jms message (both synchronous and asynchronous).
Synchronous - need to manually call the QueueReceiver.receive method
Asynchronous - requires message listener
1.) To check the default setting of your JMS broker navigate to Configurations->server-config->Java Message Service->JMS Hosts->default_JMS_host.
2.) Create JMS Connection Factory by navigating to Resources->JMS Resources->Connection Factories. For example if we want to add a jms queue factory click New and fill the ff details:
Pool Name: ipielPool
Resource Type: javax.jms.QueueConnectionFactory
Leave everything as default
Click Ok
3.) Then create a JMS queue by navigating to Resources->JMS Resources->Destination Resources, select New and fill the ff details:
JNDI Name: jms/IpielQueue
Physical destination name: jmsIpielQueue
Resource Type: javax.jms.Queue
Leave everything as default
Click Ok
Now you have successfully setup a JMS Queue broker which you can use to send and receive jms message (both synchronous and asynchronous).
Synchronous - need to manually call the QueueReceiver.receive method
Asynchronous - requires message listener
Post a Comment