Reputation: 107
I have a IBM QM that is configured in IBM WAS. A single QueueConnection is created from QCF and is loaded into memory, so that multiple threads can access the same connection(each thread will create a session out this conn) to send and receive messages from Queue. I have a performance issue with this approach.
I have an application where no.of concurrent requests will be 50 per sec. So I have to deal with the performance issue.
Any help will be appreciated.
Upvotes: 1
Views: 680
Reputation: 16056
JMS connections (i.e. QueueConnections and TopicConnections) are thread safe and can be used by multiple threads. All JMS constructs "below" a connection (i.e. Sessions, QueueSessions, TopicSessions) are not, and one should be allocated per thread.
Upvotes: 3
Reputation: 19445
Each thread should be sharing a QueueConnectionFactory rather than a QueueConnection.
Threads will then create their own QueueConnection from the factory.
Upvotes: 1