0

如果我在侦听器容器中分配了一个消息创建者,它解析出队列中的 xml 并为它创建一个等效的 java 对象,spring jms 保证这个操作是线程安全的吗?

4

2 回答 2

1

Spring JMS guarantee that the code calling message creator is thread safe, and it also expect the implementation of message creator to be thread safe too. But whether the overall flow is thread safe or not, really depends on how you write the message creator.

于 2012-10-26T07:45:23.963 回答
0

嗯,这取决于......JMSTemplate我记得 Spring 保证是线程安全的,但答案真的归结为你的实现。

干杯,

于 2012-10-26T07:14:58.007 回答