You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Ivan <xh...@gmail.com> on 2012/09/19 15:14:51 UTC

Provide a dialect mechanism for the stax things

Now, CXF uses a StaxUtils to hold all the stax related things, while it
only consider the woodstox and have optimization codes for that. How about
providing a dialect mechanism to support other stax providers ? like what
is done in Axiom project,

http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/


Thoughts ?

-- 
Ivan

Re: Provide a dialect mechanism for the stax things

Posted by Ivan <xh...@gmail.com>.
One thing in my mind is that, currently, only woodstox is marked as thread
safe, and CXF will only keep one safe factory instance here.

>From those dialect classes in axiom, the implementation of bea, xlxp, xlxp2
are all thread-safe, for those implementations, seems that we no need to
hold the factory in the blocking queue.


2012/9/20 Daniel Kulp <dk...@apache.org>

>
> On Sep 19, 2012, at 9:14 AM, Ivan <xh...@gmail.com> wrote:
>
> > Now, CXF uses a StaxUtils to hold all the stax related things, while it
> > only consider the woodstox and have optimization codes for that. How
> about
> > providing a dialect mechanism to support other stax providers ? like what
> > is done in Axiom project,
> >
> >
> http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/
> >
> > Thoughts ?
>
> Well, I guess the question is what "differences" do we need to handle
> between the various dialects?   In general, we have a "it works for all"
> but we have optimized a few targeted things for Woodstox.   If there are
> other optimizations or similar that we can do for the other dialects, sure,
> we can introduce an abstraction or something to help that out.   However, I
> don't see much point in introducing extra abstractions if they aren't
> needed. (or worse, cause performance regressions.   The wrappers that axiom
> uses would cause performance regressions with JAXB.)
>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>


-- 
Ivan

Re: Provide a dialect mechanism for the stax things

Posted by Daniel Kulp <dk...@apache.org>.
On Sep 19, 2012, at 9:14 AM, Ivan <xh...@gmail.com> wrote:

> Now, CXF uses a StaxUtils to hold all the stax related things, while it
> only consider the woodstox and have optimization codes for that. How about
> providing a dialect mechanism to support other stax providers ? like what
> is done in Axiom project,
> 
> http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/
> 
> Thoughts ?

Well, I guess the question is what "differences" do we need to handle between the various dialects?   In general, we have a "it works for all" but we have optimized a few targeted things for Woodstox.   If there are other optimizations or similar that we can do for the other dialects, sure, we can introduce an abstraction or something to help that out.   However, I don't see much point in introducing extra abstractions if they aren't needed. (or worse, cause performance regressions.   The wrappers that axiom uses would cause performance regressions with JAXB.)


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com