i m 设置一个新的多模块项目结构。 现在有一个ejb和一个耳朵模块, 我想为RESTful Web服务添加一个网络模块。 什么是最佳方法?
应用程序看起来是这样( 模块及其内容) :
app
(pom): the parent pomc或e
(ejb): ejb, hibernate, DAOs, entities, business logicear
(ear): the module that creates a deployable container
我现在要添加一个令人心烦的网络服务模块。
从模块,它只是为休息服务提供靴子,而配有 Jax-r 批注的豆子是ejb项目的一部分(我的情况是
col
:
app
ejb
(containing services + beans with jax-rs annotations)ear
war
(just containing aweb.xml
)
我使用这个方法的问题是, ejb 模块包含服务和其它资源。 保持它们分开是否更好? 还是这样走?
否则:哪一种办法会更好?
app
c或e
ear
rest
(war which contains the rest resource beans and theweb.xml
)
或
app
c或e
ear
rest
rest-resources
(separate container f或 the rest resource beans)rest-war
(war which only contains theweb.xml
)