You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2010/08/18 21:53:24 UTC

(too) many ways to make a JAX-WS client?

Given a service in CXF 2.2.10 set up with JAX-WS+JAX-B, carefully
avoiding anything more complex and exotic than MTOM, what's the least
nasty (and fastest) way to spit out a lot of client proxy objects for
it? Assume a slight preference for the JAX-WS API over the CXF API,
but only very slight.

Re: (too) many ways to make a JAX-WS client?

Posted by Benson Margulies <bi...@gmail.com>.
Thanks.


On Wed, Aug 18, 2010 at 3:59 PM, Daniel Kulp <dk...@apache.org> wrote:
> On Wednesday 18 August 2010 3:53:24 pm Benson Margulies wrote:
>> Given a service in CXF 2.2.10 set up with JAX-WS+JAX-B, carefully
>> avoiding anything more complex and exotic than MTOM, what's the least
>> nasty (and fastest) way to spit out a lot of client proxy objects for
>> it? Assume a slight preference for the JAX-WS API over the CXF API,
>> but only very slight.
>
> Do you really need a lot of proxies for it?   Could you just create one and
> then mark it thread safe (see the FAQ)?   That would definitely be the highest
> performant solution and least memory use.
>
> Avoiding CXF API's, you really can only use the Service class.   Create a
> single one of those and then create multiple clients out of it.   The Service
> class holds onto the WSDL so at least that part doesn't need to be
> reprocessed.
>
> Dropping to the CXF factory API, you can use a single factory and call create
> multiple times on it.   That is faster than the second option as it DOES hold
> onto maps of the annotations and such to make things a bit quicker.
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>

Re: (too) many ways to make a JAX-WS client?

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 18 August 2010 3:53:24 pm Benson Margulies wrote:
> Given a service in CXF 2.2.10 set up with JAX-WS+JAX-B, carefully
> avoiding anything more complex and exotic than MTOM, what's the least
> nasty (and fastest) way to spit out a lot of client proxy objects for
> it? Assume a slight preference for the JAX-WS API over the CXF API,
> but only very slight.

Do you really need a lot of proxies for it?   Could you just create one and 
then mark it thread safe (see the FAQ)?   That would definitely be the highest 
performant solution and least memory use.

Avoiding CXF API's, you really can only use the Service class.   Create a 
single one of those and then create multiple clients out of it.   The Service 
class holds onto the WSDL so at least that part doesn't need to be 
reprocessed.

Dropping to the CXF factory API, you can use a single factory and call create 
multiple times on it.   That is faster than the second option as it DOES hold 
onto maps of the annotations and such to make things a bit quicker.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog