简体   繁体   中英

Should i implement JMS server and client in one or two projects?

I have a test assignment where i need to implement communication between web client and server. WebClient is a simple web application that receives user's requests and then pushes them to ActiveMQ, so Server can handle those requests and push response back to ActiveMQ.

As i am new to JMS, my question is: should i implement client and server in one project, or decouple them?

在此处输入图片说明

这取决于您,但在现实世界中,甚至将由两个不同的团队来创建服务器和客户端。

If you imagine a scenario where you have 2 different components interacting, I would implement client and server in two different projects deployed inside 2 different EAR projects.

However in Java Enterprise applications you can use JMS to implement parallelism: you can deploy many consumers and consume concurrently the message produced by the client, achieving parallelism. In this case I think a single project for both client and server it's suitable even in real world applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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