On 07/20/2010 08:16 PM, Daniel Kulp wrote:
On Tuesday 20 July 2010 8:04:59 am Anto wrote:
Hi,
Is there any way to use WS-* specifications related to transaction with
CXF? Both client and server should take part in the transaction.
Not built into CXF itself right now, no. I think JBoss had started some
work in this area as part of their transaction support, but it's completely
tied to their transaction manager and such.
It's not being tied to the TX manager that it is the problem -- the TX
manager can be embedded in the app at little cost (it's _tiny_ and
easily embedded in any Java app). The difficulty is that at present the
WS-C, WS-AT and WS-BA implementations (n.b. the component which
implemets them is referred to as XTS) are tied to the JBossWS web
services implementation and JBossWS currently only runs inside JBoss AS.
JBossWS does come in two flavours and one of them uses CXF as the
underlying WS stack so, as long as you run inside JBoss AS you can run a
full WS-AT and WS-BA client, transactional web service and/or
coordination services on top of CXF and use all the underlying features
which are specific to CXF. The coordination services all employ JaxWS
for communications with the transactional client and with the
transactional web services so you can implement any (or all) of them in
JBoss AS/WS/CXF and interoperate with clients, services or coordinators
implemented by 3rd parties.
I have been looking at the possibility of packaging a subset of the XTS
libraries which can be used to allow WS-AT and WS-BA clients to manage
transactions and invoke transactional web services from a stand-alone
Java app. This would also require factoring out the relevant JBossWS and
underlying (WS/Native or WS/CXF stack code, Jaxb, HTTPClient etc)
libraries from the bundle that goes into the app server. This might be
tricky as far as managing versions of client libraries is concerned but
I don't think it presents problems beyond those of packaging/deployment.
It's harder to refactor things so that transactional web services can be
implemented outside of JBoss AS but that may also become an option at
some point. In theory our implementation is based on vanilla JaxWS and
should work anywhere. However, just getting our version to run over both
our own WS stack and CXF inside our AS involved fiddling with various
differences in the details of the two JaxWS implementations which the
spec does not pin down.
IN particular, the JaxWS committee failed to specify a standard way of
manipulating WSA headers and hence failed to force JaxWS implementors to
face the complexities that arise when some of the WSA options are
employed (i.e. using a ReplyTo/FaultTo endpoint rather than the HTTP
back channel to deliver replies/faults). I have resolved enough of these
issues to get XTS to run inside JBossWS on both stacks (modulo several
regressions as the JBossWS or CXF have been 'improved' :-). I have not
yet worked out how to solve these problems so that you can just deploy
our XTS code in any container/JVM which contains an arbitrary JaxWS
implementation. I'd be happy to share experience with anyone who has
tried or is trying to do the same.
In CXF roadmap support for these specimfications are included?
WS-* stuff is always "on the roadmap", but whether they get implemented or not
really depend on if someone steps up to do it (or if one of the companies that
supports CXF has a paying customer that requires it). If you would like to
contribute some work in this area, that would be great. :-)
Well, the JBoss XTS code would not be a bad place to start from in
trying to provide a version which runs on top of CXF outside of JBoss
AS. It's already a long way down that particular garden path.
regards,
Andrew Dinn
-----------