cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <>
Subject RE: ProviderFactory singleton?
Date Fri, 06 Mar 2009 10:18:15 GMT
Hi Gary

I've updated a bit ProviderFactory on the trunk, there's a default
ProviderFactory which hosts the default providers and a ProviderFactory
instance per every endpoint address, for ex,
ProviderFactory.getInstance() and ProviderFactory.getInstance("/") would
return an instance keyed by '/', etc.
So I thought that an endpoint address, as specified by jaxrs:endpoint,
would be a unique enough key for ProviderFactory instances.   

Do you have the case where multiple endpoints share the same
jaxrs:endpoint/@address ?

Is it when you have multiple CXF servlets, each of them referencing
different spring configuration files ?

Cheers, Sergey 

-----Original Message-----
From: Tong, Gary (IDEAS) [] 
Sent: 06 March 2009 09:14
Subject: ProviderFactory singleton?

Been looking through the code, and why is ProviderFactory a singleton?
I would think it would be tied to a bus or a server.  It differentiates
by address, but currently I'm working on something with two side-by-side
CXF servlets that load completely different CXF configurations.  In this
case, providers declared in one server are bleeding into the other
because the ProviderFactory uses a singleton.

Worth fixing?  Also, are there any other uses of singletons in the
system that maybe should be looked at?


NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.

View raw message