Question

J'ai un module système dans ma conception qui doit conserver son état.D'autre part, j'ai besoin de fournir un accès public à celui d'un service Web.

Qu'est-ce qui vaut mieux faire dans une telle situation.Créez un haricot stat qui peut être contrôlé par un service Web apatride ou créer un service Web StateFull.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top