protected void cacheConnection ( Connection connection , boolean closeExistingConnection ) { if ( this . connection != null && closeExistingConnection ) { try { // make sure it is closed to free up any resources it was using this . connection . close ( ) ; } catch ( JMSException e ) { msglog . errorCannotCloseConnectionMemoryMightLeak ( e ) ; } } this . connection = connection ; }
To store a connection in this processor object call this setter . If there was already a cached connection it will be closed .