Spring JMS передает контейнер слушателя

Вы можете использовать этот плагин (я соавтор)

https://github.com/tanin47/jquery.default_text

Он клонирует поле ввода и поместите его туда.

Он работает на IE, Firefox, Chrome и даже iPhone Safari, который имеет известную проблему фокусировки.

Таким образом, вам не нужно беспокоиться об очистке поля ввода перед отправкой.

ИЛИ

Если вы хотите использовать только HTML5, вы можете просто использовать атрибут «заполнитель» в поле ввода

6
задан 4 June 2009 в 19:37
поделиться

2 ответа

Контейнер представляет собой своего рода оболочку для «адаптации» любого POJO к получению сообщений из очереди или темы. Если вам нужно несколько слушателей, у вас будет несколько контейнеров.

0
ответ дан 17 December 2019 в 02:33
поделиться

If you're familiar with Message-Driven EJBs, then a Spring MessageListenerContainer is effectively replacement for an MDB. It gets its name because it's wired up with the JMS topic/queue, as well as a single JMS MessageListener, and it pulls messages off that topic/queue and feeds them to your MessageListener.

You're quite right that only one MessageListener can be registered with each container at a time, but consider that while the MessageListenerContainer code can be quite complex, it's actually a very lightweight runtime component. Don't be afraid to create several instances of it.

Also, make sure you pick the appropriate MessageListener implementation for your situation. The Simple and Default implementation are really quite different, but neither is "better".

4
ответ дан 17 December 2019 в 02:33
поделиться
Другие вопросы по тегам:

Похожие вопросы: