On Thursday 30 October 2008 2:25:51 pm vathsan wrote:
> It appears that FastInfoset has some performance benefits and I've been
> trying to find examples of how to employ it but haven't found any yet.
> Anyone here come across an example of how to make use of FastInfoset with
> CXF?
> General guidelines on its usage will also be helpful. Thanks.
The easiest is probably add:
@Features(features = { "org.apache.cxf.feature.FastInfosetFeature" })
to the interface if this is a code-first thing.
Otherwise, bus level config is pretty easy:
<bean id="fastinfoset" class="org.apache.cxf.feature.FastInfosetFeature"/>
<cxf:bus>
<cxf:features>
<ref bean="fastinfoset"/>
</cxf:features>
</cxf:bus>
The FastInfosetFeature bean has a property to "force" usage of FastInfoset if
you need to do that. However, the default usually works pretty well as it
ends up being a negotiated thing. The first request from a client
is "normal", but adds a fastinfoset thing to the Accept-Content-Type. If
the server side sees that, it responsds with fastinfoset. From there on,
the client knows the server is OK with that and will send all subsequent
requests with fastinfoset.
--
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog