且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Spring启动和停止JMS侦听器

更新时间:2023-01-18 20:21:40

您可以为监听器-容器分配一个ID.然后通过调用getBean或注入它来获取对它的引用.这将为您提供一个AbstractJmsListeningContainer,您可以在其上调用start/stop.

You can assign an id to the listener-container. Then get a reference to it, either by calling getBean or getting it injected. This will give you a AbstractJmsListeningContainer on which you can call start / stop.