Unable to reuse sessions in Springboot while producing persistent messages to SOLACE SMF


We have been trying to create a Bean that creates the JCSMPSession. In the class we are using the session object do session.connect(). We are using asynchronous mode to publish the data. It seems the code is not thread safe in this case and we are not able to receive the acknowledgement.
Can some one share a sample springboot app where sessions are been reused.