简体   繁体   English

独立的Spring + Java + JMS

[英]Standalone Spring+Java+JMS

I have two start scripts to run the standalone applications. 我有两个启动脚本来运行独立应用程序。

  1. startQueue.sh for listening JMS messages and store the message into the Oracle Database Table. startQueue.sh用于侦听JMS消息并将消息存储到Oracle数据库表中。
  2. startProcess.sh - Get the table information and process the data and delete the information from the database and terminate. startProcess.sh获取表信息并处理数据,然后从数据库中删除信息并终止。

My question is when ever the JMS message inserted into the DB then automatically trigger and process the table information using timer. 我的问题是,何时将JMS消息插入数据库,然后使用计时器自动触发并处理表信息。

您可能只是使第二个应用程序不断运行,对数据库进行轮询,但是我认为一个更好的设计是一步完成所有操作-接收JMS消息,将其插入(如有必要),然后对其进行处理,全部一个应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM