If the JMS provider supports allowing the remote to close resources such as session and producers the cached producer instances can be held forever and never again successfully send a message. Some minimal effort should be made to detect that a resource was closed and evict it from the pool or cleared from session cache so new instance can be recreated once an exception is thrown.
If the JMS provider supports allowing the remote to close resources such as session and producers the cached producer instances can be held forever and never again successfully send a message. Some minimal effort should be made to detect that a resource was closed and evict it from the pool or cleared from session cache so new instance can be recreated once an exception is thrown.