In this post we will see how to create a JMS administered objects (connection factory and a destination) in a glassfish server.
The server must be running.
We can see in properties that the admin port is 4848. So the administration console can be opened in a browser with the URL : http://localhost:4848
To start configuring JMS we need to define a connection factory
The connection factory interface is an administered object, used to create the connection with the JMS provider.
The connection factory interface is an administered object, used to create the connection with the JMS provider.
So, select Resources/JMSResource/ConnectionFactories/ New:
In this new window complete:
- PoolName
- ResourceType
- Description
- Check the enabled status
- The pool settings can be left as by default.
Click OK
Now, that the connectionFactory has been created, it is necessary define a destination resource (it could be destination, queue or topic). In this example we will define a JMS point to point so we will select queue:
Select Resources/JMSResource/DestinationResources/ New:
Select Resources/JMSResource/DestinationResources/ New:
In this new window complete:
- JNDIName
- Physical Destination Name
- ResourceType : select javax.jms.Queue
- Check the enabled status
Click OK
Now JMS resources have been defined in the server, and we can use them to handle messaging in our application.
No comments:
Post a Comment