Closing Session when using Spring's CachingConnectionFactory

后端 未结 2 1421
礼貌的吻别
礼貌的吻别 2021-01-02 12:20

The java doc here related to Spring CachingConnectionFactory has comment :

NOTE: This ConnectionFactory requires explicit closing of all Sessions obta

2条回答
  •  清歌不尽
    2021-01-02 12:48

    Application is not required to close the Session when using DefaultMessageListenerContainer, it creates the required sessions and closes them during shutdown.

    Per my understanding the note you mentioned applies when Session is created by application using CachingConnectionFactory reference about which spring will have no clue.

提交回复
热议问题