Hi Sergey, thanks for your reply. The way you describe it, WS-Context goes into a similar direction. IMO it does not matter much if you have a single instance or many instances of a stateful service, it's just a matter of taste and modelling preference.
Best regards, Bernd. Sergey Beryozkin wrote:
What would be your opinion about investing the dev effort into WS-Context ? Prehaps the high-level purpose of that spec is not to deal with bank-account scenarious but the idea would be the same in that the account id will be an application-level *context*, passed as a header, for example. The advantage is that there will be one Account instance ever which will deal with individial accounts by picking up the application context from the header (account id).
> Bernd Schuller wrote:
I was wondering about whether you think it is a good idea to add support for stateful services to CXF. By "stateful" I mean you have multiple instances of a services sitting behind a common frontend. These instances are disambiguated by some unique ID. Individual instances can be addressed using WS-Addressing. The instances are kept alive between service calls (either in memory or persisted to a database). For example, you might have a "bank account service" @Stateful @WebService public class BankAccount{ @Unique public String accountNumber; private Balance balance; @WebMethod GetBalanceResponse public getBalance(GetBalanceRequest in){...} } There's a similar thing in Sun's JAX-WS RI, see http://weblogs.java.net/blog/kohsuke/archive/2006/10/stateful_web_se.html which I think is fairly inflexible and can be greatly improved. Support for this style of services would be useful for implementing specs such as WS-RF on top of CXF. I have implemented WS-RF on top of XFire, so I have some experience with this stuff, and would very much like to give this a try with CXF.
-- Dr. Bernd Schuller Central Institute for Applied Mathematics Forschungszentrum Juelich GmbH mail [EMAIL PROTECTED] phone +49 2461 61 8736 fax +49 2461 61 6656 blog http://www.jroller.com/page/gridhaus
