How To create multiple sessions in a JMS application
posted 7 years ago
I have a requirement, where there is a multi-threaded application that requires to pick a particular value from JMS attributes.(This attribute is a user-defined attribute, the value of whivch is generated by the user).
A new thread is created for each new request and that thread should pick the particular JMS attribute value.
But what is happening, if there are 10 requests, the code is picking up correct values for first 5, but for other 5, it is not picking up correct value.
I read somewhere, that the solution to this is to create multiple sessions in the JMS connection.
Can anyone please provide the code for the same...?