cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tong, Gary \(IDEAS\)" <Gary.T...@morganstanley.com>
Subject RE: ProviderFactory singleton?
Date Fri, 06 Mar 2009 11:43:54 GMT
> Is it when you have multiple CXF servlets, each of them referencing different spring configuration
files ?

Yes exactly.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com]
Sent: 06 March 2009 10:18
To: dev@cxf.apache.org
Subject: RE: ProviderFactory singleton?

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) [mailto:Gary.Tong@morganstanley.com]
Sent: 06 March 2009 09:14
To: dev@cxf.apache.org
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?

Cheers,
Gary

------------------------------------------------------------------------
--
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.

--------------------------------------------------------------------------
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.

Mime
View raw message