November 2018
Intermediate to advanced
388 pages
9h 5m
English
After creating the Maven project with these dependencies, we will create a message Producer class:
class Producer{}
We need to initialize InitialContext here. InitialContext bootstraps the context and provides the entry point for the resolution of the named resources that we created in the GlassFish server.
We will inject InitialContext through Context Dependency Injection (CDI) as follows:
class Producer { @Inject private lateinit var initialContext: InitialContext}
As we said earlier, queues are used in the point-to-point messaging model. We look for a queue using a JNDI lookup and this will return a reference object to a queue. This queue will be used to send messages by the producer and to read messages by the ...
Read now
Unlock full access