Author: alessio.soldano(a)jboss.com
Date: 2013-01-08 05:14:39 -0500 (Tue, 08 Jan 2013)
New Revision: 17191
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngine.java
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java
Log:
Merged revisions 17130,17138,17141,17171 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk
.......
r17130 | richard.opalka(a)jboss.com | 2012-12-19 08:39:39 +0100 (Wed, 19 Dec 2012) | 1
line
fixing synchronization issues
.......
r17138 | alessio.soldano(a)jboss.com | 2012-12-19 11:37:43 +0100 (Wed, 19 Dec 2012) | 2
lines
[JBWS-3573] Create DelegateClassloader in a doPrivileged action
.......
r17141 | richard.opalka(a)jboss.com | 2012-12-19 15:07:26 +0100 (Wed, 19 Dec 2012) | 1
line
fixing synchronization issues
.......
r17171 | alessio.soldano(a)jboss.com | 2012-12-21 10:33:42 +0100 (Fri, 21 Dec 2012) | 2
lines
Get rid of old ASIL jars too
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
-
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
+
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
Modified: svn:mergeinfo
- /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766,15768,15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15857,15859,15866,15879-15881,15886-15889,15896,15900-15920,15936,15965,15967,15973,16067,16071,16086-16087,16096,16176,16183,16204-16205,16227,16230,16244-16245,16306,16315,16323,16407-16408,16412,16418,16516,16530-16532,16619,16636-16644,16691,16729-16730,16738,16782,16817,16914,16943-16944,16951,16996-16997,17042,17061,17067
+ /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766,15768,15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15857,15859,15866,15879-15881,15886-15889,15896,15900-15920,15936,15965,15967,15973,16067,16071,16086-16087,16096,16176,16183,16204-16205,16227,16230,16244-16245,16306,16315,16323,16407-16408,16412,16418,16516,16530-16532,16619,16636-16644,16691,16729-16730,16738,16782,16817,16914,16943-16944,16951,16996-16997,17042,17061,17067,17130,17138-17141,17171
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngine.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngine.java 2013-01-08
09:59:06 UTC (rev 17190)
+++
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngine.java 2013-01-08
10:14:39 UTC (rev 17191)
@@ -62,23 +62,23 @@
this.host = host;
this.port = port;
}
-
- public Bus getBus()
+
+ public synchronized Bus getBus()
{
return bus;
}
- public String getProtocol()
+ public synchronized String getProtocol()
{
return protocol;
}
- public int getPort()
+ public synchronized int getPort()
{
return port;
}
- public String getHost()
+ public synchronized String getHost()
{
return host;
}
@@ -112,7 +112,7 @@
/**
* This method is called by the ServerEngine Factory to destroy the server
*/
- protected void stop() throws Exception
+ protected synchronized void stop() throws Exception
{
if (server != null)
{
@@ -124,7 +124,7 @@
* This method will shut down the server engine and
* remove it from the factory's cache.
*/
- public void shutdown()
+ public synchronized void shutdown()
{
if (factory != null && handlerCount == 0)
{
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java 2013-01-08
09:59:06 UTC (rev 17190)
+++
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java 2013-01-08
10:14:39 UTC (rev 17191)
@@ -44,7 +44,7 @@
*/
public class HttpServerEngineFactory implements BusLifeCycleListener
{
- private static final Logger LOG =
LogUtils.getL7dLogger(HttpServerEngineFactory.class);
+ private static final Logger LOG =
LogUtils.getL7dLogger(HttpServerEngineFactory.class);
private static Map<Integer, HttpServerEngine> portMap = new HashMap<Integer,
HttpServerEngine>();
private BusLifeCycleManager lifeCycleManager;
@@ -79,7 +79,7 @@
{
return bus;
}
-
+
/**
* Retrieve a previously configured HttpServerEngine for the
* given port. If none exists, this call returns null.
@@ -116,7 +116,7 @@
}
return ref;
}
-
+
/**
* This method removes the Server Engine from the port map and stops it.
*/
@@ -145,12 +145,15 @@
// do nothing here
}
- public void postShutdown()
+ public synchronized void postShutdown()
{
// shut down the httpserver in the portMap
- // To avoid the CurrentModificationException,
- // do not use portMap.vaules directly
- HttpServerEngine[] engines = portMap.values().toArray(new HttpServerEngine[0]);
+ // To avoid the CurrentModificationException,
+ // do not use portMap.vaules directly
+ HttpServerEngine[] engines = null;
+ synchronized (portMap) {
+ engines = portMap.values().toArray(new HttpServerEngine[0]);
+ }
for (HttpServerEngine engine : engines)
{
if (engine.getBus() == getBus())
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-01-08
09:59:06 UTC (rev 17190)
+++
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-01-08
10:14:39 UTC (rev 17191)
@@ -196,7 +196,7 @@
}
//then setup a new TCCL having visibility over both the client path (JBossWS
//jaxws-client module on AS7) and the the former TCCL (i.e. the deployment
classloader)
- setContextClassLoader(new DelegateClassLoader(clientClassLoader,
origClassLoader));
+ setContextClassLoader(createDelegateClassLoader(clientClassLoader,
origClassLoader));
return true;
}
return false;
@@ -214,6 +214,25 @@
}
return bus;
}
+
+ private static DelegateClassLoader createDelegateClassLoader(final ClassLoader
clientClassLoader, final ClassLoader origClassLoader)
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return new DelegateClassLoader(clientClassLoader, origClassLoader);
+ }
+ else
+ {
+ return AccessController.doPrivileged(new
PrivilegedAction<DelegateClassLoader>()
+ {
+ public DelegateClassLoader run()
+ {
+ return new DelegateClassLoader(clientClassLoader, origClassLoader);
+ }
+ });
+ }
+ }
/**
* Get context classloader.
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2013-01-08
09:59:06 UTC (rev 17190)
+++
stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2013-01-08
10:14:39 UTC (rev 17191)
@@ -198,6 +198,7 @@
<delete includeemptydirs="true" verbose="true">
<fileset dir="${jboss.modules}">
<include
name="**/org/jboss/as/webservices/main/jbossws-*-resources*"/>
+ <include
name="**/org/jboss/as/webservices/main/jbossws-jboss*"/>
</fileset>
</delete>
<antcall target="remove-jboss-integration-module">
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java 2013-01-08
09:59:06 UTC (rev 17190)
+++
stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java 2013-01-08
10:14:39 UTC (rev 17191)
@@ -21,6 +21,8 @@
*/
package org.jboss.wsf.stack.cxf.security.authentication;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.security.Principal;
import java.util.Calendar;
import java.util.ResourceBundle;
@@ -91,7 +93,7 @@
{
ClassLoader tccl = SecurityActions.getContextClassLoader();
//allow PicketBox to see jbossws modules' classes
- SecurityActions.setContextClassLoader(new
DelegateClassLoader(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader(),
tccl));
+
SecurityActions.setContextClassLoader(createDelegateClassLoader(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader(),
tccl));
try
{
if (ctx.isValid(principal, password, subject) == false)
@@ -166,6 +168,25 @@
{
this.decodeNonce = decodeNonce;
}
+
+ private static DelegateClassLoader createDelegateClassLoader(final ClassLoader
clientClassLoader, final ClassLoader origClassLoader)
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return new DelegateClassLoader(clientClassLoader, origClassLoader);
+ }
+ else
+ {
+ return AccessController.doPrivileged(new
PrivilegedAction<DelegateClassLoader>()
+ {
+ public DelegateClassLoader run()
+ {
+ return new DelegateClassLoader(clientClassLoader, origClassLoader);
+ }
+ });
+ }
+ }
private static Calendar unmarshalDateTime(String value)
{