cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tully, Gary" <Gary.Tu...@iona.com>
Subject RE: Support for stateful services in CXF
Date Fri, 23 Mar 2007 12:31:55 GMT
Hi Bernd,

Only yesterday I started to investigate providing simple support for a
single instance service that can represent many WS-addressing
identities. 

What I am after at the moment is a simpler version of what is supported
by @Stateful in the JAX-WS RI. The only state is a unique-id that is
encapsulated in the WS-Address.
 
My use case comes from the use of the FactoryPattern in back-end
services that I want to expose as WS.

>From a HTTP perspective, cxf already supports listening for requests on
a context "startsWith" basis rather than a on a perfect match, so
multiple EPRs can be directed to a single service. I think the
WebContext will provide enough information to allow the service to
determine its identity during dispatch from the target address. Things
like WSDL generation will need a bit of thought and work.

At the moment I am capturing the FactoryPattern use-case as a system
test in order to provide a starting proof-point for an implementation.

The use of WS-Context (thanks Sergey) or HTTP session information as a
means of determining unique id would be neat but I think this is
orthogonal.

>From a WS-RF point of view, what are the usage scenarios that you will
need? Do they lend them selves to capture as system tests?

Like you, I am learning as I go here, so any input is appreciated,
especially your ideas on improving @Stateful and your experiences doing
something similar with Xfire.

As I am only starting on my quest for a design, you may as well give it
a try from your perspective. We can swap ideas or experiences to come up
with a working solution. It need not be a race :-)

Best regards,
Gary.

> -----Original Message-----
> From: Bernd Schuller [mailto:b.schuller@fz-juelich.de] 
> Sent: 23 March 2007 07:36
> To: CXF devel
> Subject: Support for stateful services in CXF
> 
> Hi all,
> 
> first, I'm new to CXF, so forgive my lack of detailed knowledge.
> 
> 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.
> 
> 
> What do you think?
> 
> 
> Best regards,
> Bernd.
> 
> --
> Dr. Bernd Schuller
> 
> Central Institute for Applied Mathematics Forschungszentrum 
> Juelich GmbH
> 
> mail  b.schuller@fz-juelich.de
> phone +49 2461 61 8736
> fax   +49 2461 61 6656
> blog  http://www.jroller.com/page/gridhaus
> 
> 

Mime
View raw message