Frage

Ich habe ein Systemmodul in meinem Design, das seinen Zustand aufrechterhalten muss.Auf der anderen Seite muss ich einen öffentlichen Zugriff durch einen Webservice angeben.

was ist besser in einer solchen Situation zu tun.Erstellen Sie eine stateful Bohne, die von einem statellosen Webservice gesteuert werden kann oder einen statefull Web-Service erstellen kann.

War es hilfreich?

Lösung

It's better to maintain core functionality(state) within your module & let others access it, but can't alter it. Also in case of changes, it will be limited to your module only, others will remain unaffected.

Performance wise also, I think it will be better to use statefull beans as web-services are called remotely & may loose the state in case of network failure etc.

They are mainly developed to interact with homogeneous/heterogenous applications and to decouple the functionality, mainly to consume/expose a service which further processes the business logic.

Also, if you are adding new external modules in future, they don't have to reimplement the functionality for maintaining state & can just reuse it.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top