Creating temporary JMS jms topic in Spring

后端 未结 2 1275
傲寒
傲寒 2021-01-14 07:20

I\'m trying to refactor some legacy code to use Spring to handle the jms connections to a mainframe service. I need to connect create a temporary topic for the mainframe ser

2条回答
  •  深忆病人
    2021-01-14 08:21

    If you need low-level access to the JMS API using JmsTemplate, then you need to use one of JmsTemplate's execute(...) methods. The simplest of these is execute(SessionCallBack), where the SessionCallback provides you with the JMS Session object. With that, you can call createTemporaryQueue() or createTemporaryTopic(). You can probably use one of the other execute() methods do some of the initial work for you, though, such as this one.

提交回复
热议问题