You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2014/12/24 18:56:17 UTC
cxf git commit: [CXF-6176] Minor update to get providers registered
on the bus shared between multiple JAXRS factories
Repository: cxf
Updated Branches:
refs/heads/master eb9552724 -> bac8c8dae
[CXF-6176] Minor update to get providers registered on the bus shared between multiple JAXRS factories
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/bac8c8da
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bac8c8da
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bac8c8da
Branch: refs/heads/master
Commit: bac8c8dae9bcddb7d66afabbbc0b9b0f9c63028c
Parents: eb95527
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Wed Dec 24 17:55:40 2014 +0000
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Wed Dec 24 17:55:40 2014 +0000
----------------------------------------------------------------------
.../cxf/jaxrs/provider/ProviderFactory.java | 2 +-
.../systest/jaxrs/security/oauth2/server.xml | 27 ++++++++++++++++----
2 files changed, 23 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/bac8c8da/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
index 934a652..7500eca 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
@@ -457,7 +457,7 @@ public abstract class ProviderFactory {
protected void setBusProviders() {
List<Object> extensions = new LinkedList<Object>();
- final String alreadySetProp = "bus.providers.set";
+ final String alreadySetProp = "bus.providers.set." + this.hashCode();
if (bus.getProperty(alreadySetProp) == null) {
addBusExtension(extensions,
MessageBodyReader.class,
http://git-wip-us.apache.org/repos/asf/cxf/blob/bac8c8da/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml
index e1a06e3..f3f6fbe 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml
@@ -17,13 +17,34 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xsi:schemaLocation=" http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd ">
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+ xmlns:sec="http://cxf.apache.org/configuration/security"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+ http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
+ <cxf:properties>
+ <entry key="org.apache.cxf.jaxrs.bus.providers" value-ref="busProviders"/>
+ </cxf:properties>
</cxf:bus>
+ <!-- providers -->
+ <util:list id="busProviders">
+ <ref bean="oauthJson"/>
+ </util:list>
<httpj:engine-factory id="port-9095-tls-config">
<httpj:engine port="${testutil.ports.jaxrs-oauth2}">
<httpj:tlsServerParameters>
@@ -59,9 +80,6 @@ under the License.
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
- <jaxrs:providers>
- <ref bean="oauthJson"/>
- </jaxrs:providers>
<jaxrs:properties>
<entry key="ws-security.signature.properties" value="org/apache/cxf/systest/jaxrs/security/alice.properties"/>
</jaxrs:properties>
@@ -71,7 +89,6 @@ under the License.
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
- <ref bean="oauthJson"/>
<ref bean="samlAuthHandler"/>
</jaxrs:providers>
<jaxrs:properties>