How much is the overhead of creating following objects everytime sending the message to queue?
Objects: javax.jms.Connection
, javax.jms.Session
, javax.jms.MessageProducer
In my code, Whenever I want to send a message, I am creating above 3 objects.
I know its good to create object only once and use it but the connection/session goes into IllegalState after Server Failover. My connectionFactory
is able to reconnect but it is not able to refresh connection/session object.
Can someone please explain me the overhead?