JBossWS SVN: r18462 - container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-03-05 05:50:40 -0500 (Wed, 05 Mar 2014)
New Revision: 18462
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
Log:
[WFLY-3061] Use readResourceFromRoot(PathAddress address, boolean recursive)
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2014-03-05 10:14:36 UTC (rev 18461)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2014-03-05 10:50:40 UTC (rev 18462)
@@ -137,7 +137,7 @@
}
private static boolean isJMXSubsystemAvailable(final OperationContext context) {
- Resource root = context.readResourceFromRoot(PathAddress.pathAddress(PathAddress.EMPTY_ADDRESS));
+ Resource root = context.readResourceFromRoot(PathAddress.pathAddress(PathAddress.EMPTY_ADDRESS), false);
return root.hasChild(PathElement.pathElement(SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME));
}
}
11 years
JBossWS SVN: r18461 - in container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices: service and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-03-05 05:14:36 -0500 (Wed, 05 Mar 2014)
New Revision: 18461
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java
Log:
[WFLY-3061] Prevent transient failures (JBWS1178TestCase, JBWS2150TestCase) due to JMX MBean server not being available when the OPTIONAL dependency to it is set
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2014-03-04 18:36:52 UTC (rev 18460)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2014-03-05 10:14:36 UTC (rev 18461)
@@ -21,6 +21,7 @@
*/
package org.jboss.as.webservices.dmr;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
import static org.jboss.as.webservices.WSLogger.ROOT_LOGGER;
import static org.jboss.as.webservices.dmr.Constants.WSDL_HOST;
import static org.jboss.as.webservices.dmr.Constants.WSDL_PORT;
@@ -40,6 +41,7 @@
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.controller.registry.Resource;
import org.jboss.as.controller.registry.Resource.ResourceEntry;
+import org.jboss.as.jmx.JMXExtension;
import org.jboss.as.server.AbstractDeploymentChainStep;
import org.jboss.as.server.DeploymentProcessorTarget;
import org.jboss.as.webservices.config.ServerConfigImpl;
@@ -80,13 +82,14 @@
}, OperationContext.Stage.RUNTIME);
ServiceTarget serviceTarget = context.getServiceTarget();
+ final boolean jmxAvailable = isJMXSubsystemAvailable(context);
if (appclient && model.hasDefined(WSDL_HOST)) {
ServerConfigImpl serverConfig = createServerConfig(model, true, context);
- newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context)));
+ newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context), jmxAvailable));
}
if (!appclient) {
ServerConfigImpl serverConfig = createServerConfig(model, false, context);
- newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context)));
+ newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context), jmxAvailable));
final Resource webSubsystem = context.readResourceFromRoot(PathAddress.pathAddress(PathElement.pathElement("subsystem", "web")));
String defaultHost = webSubsystem.getModel().get("default-virtual-server").asString();
newControllers.add(PortComponentLinkService.install(serviceTarget, defaultHost, verificationHandler));
@@ -133,4 +136,8 @@
}
}
+ private static boolean isJMXSubsystemAvailable(final OperationContext context) {
+ Resource root = context.readResourceFromRoot(PathAddress.pathAddress(PathAddress.EMPTY_ADDRESS));
+ return root.hasChild(PathElement.pathElement(SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME));
+ }
}
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2014-03-04 18:36:52 UTC (rev 18460)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2014-03-05 10:14:36 UTC (rev 18461)
@@ -52,6 +52,7 @@
import org.jboss.security.SecurityUtil;
import org.jboss.ws.api.monitoring.RecordProcessor;
import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.ws.common.management.ManagedEndpoint;
import org.jboss.ws.common.monitoring.ManagedRecordProcessor;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -69,13 +70,12 @@
*/
public final class EndpointService implements Service<Endpoint> {
- private static final ServiceName MBEAN_SERVER_NAME = ServiceName.JBOSS.append("mbean", "server");
private final Endpoint endpoint;
private final ServiceName name;
private final InjectedValue<SecurityDomainContext> securityDomainContextValue = new InjectedValue<SecurityDomainContext>();
private final InjectedValue<WebAppController> pclWebAppControllerValue = new InjectedValue<WebAppController>();
private final InjectedValue<EndpointRegistry> endpointRegistryValue = new InjectedValue<EndpointRegistry>();
- private final InjectedValue<MBeanServer> mBeanServerValue = new InjectedValue<MBeanServer>();
+ private final InjectedValue<AbstractServerConfig> serverConfigServiceValue = new InjectedValue<AbstractServerConfig>();
private EndpointService(final Endpoint endpoint, final ServiceName name) {
this.endpoint = endpoint;
@@ -126,7 +126,7 @@
}
private void registerRecordProcessor(final RecordProcessor processor, final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
mbeanServer.registerMBean(processor, ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
@@ -146,7 +146,7 @@
}
private void unregisterRecordProcessor(final RecordProcessor processor, final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
@@ -159,7 +159,7 @@
}
private void registerEndpoint(final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
@@ -174,7 +174,7 @@
}
private void unregisterEndpoint(final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
mbeanServer.unregisterMBean(endpoint.getName());
@@ -205,8 +205,8 @@
return endpointRegistryValue;
}
- public Injector<MBeanServer> getMBeanServerInjector() {
- return mBeanServerValue;
+ public Injector<AbstractServerConfig> getAbstractServerConfigInjector() {
+ return serverConfigServiceValue;
}
public static void install(final ServiceTarget serviceTarget, final Endpoint endpoint, final DeploymentUnit unit) {
@@ -225,10 +225,8 @@
builder.addDependency(DependencyType.REQUIRED,
WSServices.PORT_COMPONENT_LINK_SERVICE,
WebAppController.class, service.getPclWebAppControllerInjector());
- builder.addDependency(DependencyType.OPTIONAL, MBEAN_SERVER_NAME,
- MBeanServer.class,
- service.getMBeanServerInjector());
- builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE);
+ builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE, AbstractServerConfig.class,
+ service.getAbstractServerConfigInjector());
builder.setInitialMode(Mode.ACTIVE);
builder.install();
//add a dependency on the endpoint service to web deployments, so that the
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java 2014-03-04 18:36:52 UTC (rev 18460)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java 2014-03-05 10:14:36 UTC (rev 18461)
@@ -42,6 +42,7 @@
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
+import org.jboss.msc.value.ImmediateValue;
import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.wsf.spi.management.ServerConfig;
@@ -86,9 +87,13 @@
}
public static ServiceController<?> install(final ServiceTarget serviceTarget, final ServerConfigImpl serverConfig,
- final ServiceListener<Object> listener, final List<ServiceName> dependencies) {
+ final ServiceListener<Object> listener, final List<ServiceName> dependencies, final boolean jmxSubsystemAvailable) {
final ServiceBuilder<ServerConfig> builder = serviceTarget.addService(WSServices.CONFIG_SERVICE, new ServerConfigService(serverConfig));
- builder.addDependency(DependencyType.OPTIONAL, MBEAN_SERVER_NAME, MBeanServer.class, serverConfig.getMBeanServerInjector());
+ if (jmxSubsystemAvailable) {
+ builder.addDependency(DependencyType.REQUIRED, MBEAN_SERVER_NAME, MBeanServer.class, serverConfig.getMBeanServerInjector());
+ } else {
+ serverConfig.getMBeanServerInjector().setValue(new ImmediateValue<MBeanServer>(null));
+ }
builder.addDependency(ServerEnvironmentService.SERVICE_NAME, ServerEnvironment.class, serverConfig.getServerEnvironmentInjector());
for (ServiceName dep : dependencies) {
builder.addDependency(dep);
11 years
JBossWS SVN: r18460 - in container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices: service and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-03-04 13:36:52 -0500 (Tue, 04 Mar 2014)
New Revision: 18460
Modified:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java
Log:
[WFLY-3061] Prevent transient failures (JBWS1178TestCase, JBWS2150TestCase) due to JMX MBean server not being available when the OPTIONAL dependency to it is set
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2014-03-04 11:07:33 UTC (rev 18459)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2014-03-04 18:36:52 UTC (rev 18460)
@@ -21,6 +21,7 @@
*/
package org.jboss.as.webservices.dmr;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
import static org.jboss.as.webservices.WSLogger.ROOT_LOGGER;
import static org.jboss.as.webservices.dmr.Constants.WSDL_HOST;
import static org.jboss.as.webservices.dmr.Constants.WSDL_PORT;
@@ -35,10 +36,12 @@
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.PathAddress;
+import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.ProcessType;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.controller.registry.Resource;
import org.jboss.as.controller.registry.Resource.ResourceEntry;
+import org.jboss.as.jmx.JMXExtension;
import org.jboss.as.server.AbstractDeploymentChainStep;
import org.jboss.as.server.DeploymentProcessorTarget;
import org.jboss.as.web.host.CommonWebServer;
@@ -80,13 +83,14 @@
}, OperationContext.Stage.RUNTIME);
ServiceTarget serviceTarget = context.getServiceTarget();
+ final boolean jmxAvailable = isJMXSubsystemAvailable(context);
if (appclient && model.hasDefined(WSDL_HOST)) {
ServerConfigImpl serverConfig = createServerConfig(model, true, context);
- newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context, appclient)));
+ newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context, appclient), jmxAvailable));
}
if (!appclient) {
ServerConfigImpl serverConfig = createServerConfig(model, false, context);
- newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context, appclient)));
+ newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler, getServerConfigDependencies(context, appclient), jmxAvailable));
}
newControllers.add(XTSClientIntegrationService.install(serviceTarget, verificationHandler));
}
@@ -134,4 +138,9 @@
}
}
+ private static boolean isJMXSubsystemAvailable(final OperationContext context) {
+ //context.readResourceFromRoot(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME))) != null
+ Resource root = context.readResourceFromRoot(PathAddress.pathAddress(PathAddress.EMPTY_ADDRESS));
+ return root.hasChild(PathElement.pathElement(SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME));
+ }
}
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2014-03-04 11:07:33 UTC (rev 18459)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2014-03-04 18:36:52 UTC (rev 18460)
@@ -60,6 +60,7 @@
import org.jboss.security.SecurityUtil;
import org.jboss.ws.api.monitoring.RecordProcessor;
import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.ws.common.management.ManagedEndpoint;
import org.jboss.ws.common.monitoring.ManagedRecordProcessor;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -77,11 +78,10 @@
*/
public final class EndpointService implements Service<Endpoint> {
- private static final ServiceName MBEAN_SERVER_NAME = ServiceName.JBOSS.append("mbean", "server");
private final Endpoint endpoint;
private final ServiceName name;
private final InjectedValue<SecurityDomainContext> securityDomainContextValue = new InjectedValue<SecurityDomainContext>();
- private final InjectedValue<MBeanServer> mBeanServerValue = new InjectedValue<MBeanServer>();
+ private final InjectedValue<AbstractServerConfig> serverConfigServiceValue = new InjectedValue<AbstractServerConfig>();
private final InjectedValue<EJBViewMethodSecurityAttributesService> ejbMethodSecurityAttributeServiceValue = new InjectedValue<EJBViewMethodSecurityAttributesService>();
private EndpointService(final Endpoint endpoint, final ServiceName name) {
@@ -131,7 +131,7 @@
}
private void registerEndpoint(final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
@@ -146,7 +146,7 @@
}
private void unregisterEndpoint(final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
mbeanServer.unregisterMBean(endpoint.getName());
@@ -160,7 +160,7 @@
}
private void registerRecordProcessor(final RecordProcessor processor, final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
mbeanServer.registerMBean(processor,
@@ -180,7 +180,7 @@
}
private void unregisterRecordProcessor(final RecordProcessor processor, final Endpoint ep) {
- MBeanServer mbeanServer = mBeanServerValue.getValue();
+ MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
if (mbeanServer != null) {
try {
mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
@@ -196,8 +196,8 @@
return securityDomainContextValue;
}
- public Injector<MBeanServer> getMBeanServerInjector() {
- return mBeanServerValue;
+ public Injector<AbstractServerConfig> getAbstractServerConfigInjector() {
+ return serverConfigServiceValue;
}
public Injector<EJBViewMethodSecurityAttributesService> getEJBMethodSecurityAttributeServiceInjector() {
@@ -216,8 +216,8 @@
builder.addDependency(DependencyType.REQUIRED,
SecurityDomainService.SERVICE_NAME.append(getDeploymentSecurityDomainName(endpoint)),
SecurityDomainContext.class, service.getSecurityDomainContextInjector());
- builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE);
- builder.addDependency(DependencyType.OPTIONAL, MBEAN_SERVER_NAME, MBeanServer.class, service.getMBeanServerInjector());
+ builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE, AbstractServerConfig.class,
+ service.getAbstractServerConfigInjector());
if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
builder.addDependency(DependencyType.OPTIONAL, getEJBViewMethodSecurityAttributesServiceName(unit, endpoint),
EJBViewMethodSecurityAttributesService.class, service.getEJBMethodSecurityAttributeServiceInjector());
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java 2014-03-04 11:07:33 UTC (rev 18459)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/service/ServerConfigService.java 2014-03-04 18:36:52 UTC (rev 18460)
@@ -42,6 +42,7 @@
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
+import org.jboss.msc.value.ImmediateValue;
import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.wsf.spi.management.ServerConfig;
@@ -85,9 +86,13 @@
}
public static ServiceController<?> install(final ServiceTarget serviceTarget, final ServerConfigImpl serverConfig,
- final ServiceListener<Object> listener, final List<ServiceName> dependencies) {
+ final ServiceListener<Object> listener, final List<ServiceName> dependencies, final boolean jmxSubsystemAvailable) {
final ServiceBuilder<ServerConfig> builder = serviceTarget.addService(WSServices.CONFIG_SERVICE, new ServerConfigService(serverConfig));
- builder.addDependency(DependencyType.OPTIONAL, MBEAN_SERVER_NAME, MBeanServer.class, serverConfig.getMBeanServerInjector());
+ if (jmxSubsystemAvailable) {
+ builder.addDependency(DependencyType.REQUIRED, MBEAN_SERVER_NAME, MBeanServer.class, serverConfig.getMBeanServerInjector());
+ } else {
+ serverConfig.getMBeanServerInjector().setValue(new ImmediateValue<MBeanServer>(null));
+ }
builder.addDependency(ServerEnvironmentService.SERVICE_NAME, ServerEnvironment.class, serverConfig.getServerEnvironmentInjector());
for (ServiceName dep : dependencies) {
builder.addDependency(dep);
11 years
JBossWS SVN: r18459 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-03-04 06:07:33 -0500 (Tue, 04 Mar 2014)
New Revision: 18459
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
Log:
Removing useless import
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2014-03-04 11:06:44 UTC (rev 18458)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2014-03-04 11:07:33 UTC (rev 18459)
@@ -21,8 +21,6 @@
*/
package org.jboss.wsf.stack.cxf.transport;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseEndpoint;
-
import java.io.IOException;
import java.util.List;
11 years
JBossWS SVN: r18458 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-03-04 06:06:44 -0500 (Tue, 04 Mar 2014)
New Revision: 18458
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java
Log:
Adding missing trailer
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java 2014-03-04 10:47:32 UTC (rev 18457)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java 2014-03-04 11:06:44 UTC (rev 18458)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.wsf.stack.cxf.security.authentication;
import java.security.Principal;
@@ -15,7 +36,7 @@
import org.jboss.wsf.stack.cxf.Loggers;
import org.jboss.wsf.stack.cxf.Messages;
-/*
+/**
* Interceptor to authenticate principal with provided jaspi JBossAuthenticationManager
* @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
11 years
JBossWS SVN: r18457 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-03-04 05:47:32 -0500 (Tue, 04 Mar 2014)
New Revision: 18457
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3738] Updating temporary excludes
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2014-03-04 07:23:17 UTC (rev 18456)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2014-03-04 10:47:32 UTC (rev 18457)
@@ -702,7 +702,7 @@
<!--There is no jbossws-cxf-jaspi installed in as720-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/Jaspi*TestCase*</exclude>
- <!-- test still under development -->
+ <!-- [JBWS-3738] test still under development -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustBearerTestCase*</exclude>
</excludes>
</configuration>
@@ -793,7 +793,7 @@
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
- <!-- test still under development -->
+ <!-- [JBWS-3738] test still under development -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustBearerTestCase*</exclude>
</excludes>
</configuration>
@@ -885,6 +885,8 @@
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
+ <!-- [JBWS-3738] test still under development -->
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustBearerTestCase*</exclude>
</excludes>
</configuration>
</plugin>
11 years
JBossWS SVN: r18456 - in stack/cxf/trunk/modules/testsuite: cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: psakar
Date: 2014-03-04 02:23:17 -0500 (Tue, 04 Mar 2014)
New Revision: 18456
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java
Log:
Include original error message in exceptions related to Bouncy Castle provider
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2014-03-03 18:23:18 UTC (rev 18455)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2014-03-04 07:23:17 UTC (rev 18456)
@@ -69,7 +69,7 @@
}
catch (SOAPFaultException e)
{
- throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+ throw new Exception("Error " + e.getMessage() + " - please check that the Bouncy Castle provider is installed.", e);
}
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java 2014-03-03 18:23:18 UTC (rev 18455)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java 2014-03-04 07:23:17 UTC (rev 18456)
@@ -62,7 +62,7 @@
}
catch (SOAPFaultException e)
{
- throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+ throw new Exception("Error " + e.getMessage() + " - please check that the Bouncy Castle provider is installed.", e);
}
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java 2014-03-03 18:23:18 UTC (rev 18455)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java 2014-03-04 07:23:17 UTC (rev 18456)
@@ -64,7 +64,7 @@
}
catch (SOAPFaultException e)
{
- throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+ throw new Exception("Error " + e.getMessage() + " - please check that the Bouncy Castle provider is installed.", e);
}
}
@@ -81,7 +81,7 @@
}
catch (SOAPFaultException e)
{
- throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+ throw new Exception("Error " + e.getMessage() + " - please check that the Bouncy Castle provider is installed.", e);
}
}
11 years
JBossWS SVN: r18455 - in stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws: extensions/validation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2014-03-03 13:23:18 -0500 (Mon, 03 Mar 2014)
New Revision: 18455
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
Log:
[JBPAPP-10869] fix the case where schemaLocation is explicitly set in annotation
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2014-03-03 16:58:07 UTC (rev 18454)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2014-03-03 18:23:18 UTC (rev 18455)
@@ -98,14 +98,13 @@
private void validatePayload(Source source)
{
- SchemaExtractor schemaExtractor = new SchemaExtractor();
try
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
feature = epMetaData.getFeature(SchemaValidationFeature.class);
URL xsdURL = feature.getSchemaLocation() != null ? new URL(feature.getSchemaLocation()) : null;
- Map<String, byte[]> xsdStreams = new HashMap<String, byte[]>();
+ Map<String, byte[]> xsdStreams = null;
if (xsdURL == null)
{
URL wsdlURL = epMetaData.getServiceMetaData().getWsdlFileOrLocation();
@@ -115,21 +114,18 @@
}
else
{
- xsdStreams = schemaExtractor.getSchemas(wsdlURL);
+ SchemaExtractor schemaExtractor = new SchemaExtractor(wsdlURL);
+ xsdStreams = schemaExtractor.getSchemasFromWsdl();
}
}
- if (xsdURL != null)
+ else
{
- ErrorHandler errorHandler = feature.getErrorHandler();
- Element xmlDOM = DOMUtils.sourceToElement(source);
- new SchemaValidationHelper(xsdURL).setErrorHandler(errorHandler).validateDocument(xmlDOM);
+ SchemaExtractor schemaExtractor = new SchemaExtractor(xsdURL);
+ xsdStreams = schemaExtractor.getSchemas();
}
- else //xsdStreams != null
- {
- ErrorHandler errorHandler = feature.getErrorHandler();
- Element xmlDOM = DOMUtils.sourceToElement(source);
- new SchemaValidationHelper(xsdStreams).setErrorHandler(errorHandler).validateDocument(xmlDOM);
- }
+ ErrorHandler errorHandler = feature.getErrorHandler();
+ Element xmlDOM = DOMUtils.sourceToElement(source);
+ new SchemaValidationHelper(xsdStreams).setErrorHandler(errorHandler).validateDocument(xmlDOM);
}
catch (RuntimeException rte)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java 2014-03-03 16:58:07 UTC (rev 18454)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java 2014-03-03 18:23:18 UTC (rev 18455)
@@ -23,10 +23,10 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.File;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.util.ArrayList;
@@ -62,8 +62,10 @@
// provide logging
private static Logger log = Logger.getLogger(SchemaExtractor.class);
private static Transformer transformer = null;
- private String path;
- static {
+ private URL topLevelResource;
+
+ static
+ {
try
{
transformer = TransformerFactory.newInstance().newTransformer();
@@ -72,18 +74,31 @@
{
throw new RuntimeException(e);
}
+ }
+ public SchemaExtractor(URL wsdlURL)
+ {
+ this.topLevelResource = wsdlURL;
}
- public Map<String, byte[]> getSchemas(URL wsdlURL) throws IOException
+
+ public Map<String, byte[]> getSchemas() throws IOException
{
Map<String, byte[]> streams = new HashMap<String, byte[]>();
- //Get the path to the WSDL
- String wsdlFile = wsdlURL.getFile();
- int lastSlash = wsdlFile.lastIndexOf(File.separator);
- path = wsdlFile.substring(0, lastSlash+1);
+ Element root = DOMUtils.parse(topLevelResource.openStream());
+ List<Element> list = new ArrayList<Element>();
+ list.add(root);
+ //no need to propagate any namespaces here
+ List<Attr> nsAttrs = new ArrayList<Attr>();
+ processSchemas(streams, list, nsAttrs);
+ return streams;
+ }
+ public Map<String, byte[]> getSchemasFromWsdl() throws IOException
+ {
+ Map<String, byte[]> streams = new HashMap<String, byte[]>();
+
// parse the wsdl
- Element root = DOMUtils.parse(wsdlURL.openStream());
+ Element root = DOMUtils.parse(topLevelResource.openStream());
List<Attr> nsAttrs = getNamespaceAttrs(root);
@@ -105,6 +120,14 @@
return null;
}
+ processSchemas(streams, schemaElements, nsAttrs);
+
+ return streams;
+ }
+
+ private void processSchemas(Map<String, byte[]> streams, List<Element> schemaElements, List<Attr> nsAttrs)
+ throws IOException
+ {
for (Element schemaElement : schemaElements)
{
@@ -124,8 +147,6 @@
+ schemaElement.getAttribute("targetNamespace"));
}
-
-
for (Attr nsAttr : nsAttrs)
{
@@ -147,8 +168,6 @@
String tns = newSchemeElement.getAttribute("targetNamespace");
streams.put(tns, outStream.toByteArray());
}
-
- return streams;
}
private List<Attr> getNamespaceAttrs(Element element)
@@ -191,7 +210,9 @@
try
{
- FileInputStream in = new FileInputStream( path + schemaLocation );
+ URL url = new URL(topLevelResource, schemaLocation);
+ schemaLocation = url.toString();
+ InputStream in = url.openStream();
outStream = new ByteArrayOutputStream();
int bt = 0;
@@ -212,7 +233,7 @@
}
catch(IOException ioe)
{
- log.warn("Error obtaining schema: " + path + schemaLocation);
+ log.warn("Error obtaining schema: " + schemaLocation);
}
}
}
11 years
JBossWS SVN: r18454 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-03-03 11:58:07 -0500 (Mon, 03 Mar 2014)
New Revision: 18454
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3765] Also move parallel test execution to 'fast' profile
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2014-03-03 11:52:31 UTC (rev 18453)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2014-03-03 16:58:07 UTC (rev 18454)
@@ -265,9 +265,6 @@
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>
</includes>
- <parallel>classes</parallel>
- <threadCount>1</threadCount>
- <perCoreThreadCount>true</perCoreThreadCount>
<systemProperties>
<property>
<name>jboss.bind.address</name>
@@ -566,6 +563,9 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <parallel>classes</parallel>
+ <threadCount>2</threadCount>
+ <perCoreThreadCount>true</perCoreThreadCount>
<runOrder>balanced</runOrder>
</configuration>
</plugin>
11 years
JBossWS SVN: r18453 - projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-03-03 06:52:31 -0500 (Mon, 03 Mar 2014)
New Revision: 18453
Modified:
projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
Log:
More test fix
Modified: projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java 2014-03-03 11:51:17 UTC (rev 18452)
+++ projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java 2014-03-03 11:52:31 UTC (rev 18453)
@@ -156,7 +156,7 @@
reqCtx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2314").replaceFirst("8080", "7070"));
+ //((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2314").replaceFirst("8080", "7070"));
assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Sender Vouches with X.509 Certificates, Sign, Optional Encrypt"));
}
@@ -222,7 +222,7 @@
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:2.0:cm:sender-vouches");
cbh.setSaml2(true);
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
- //((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURLHttps + "SecurityService2322").replaceFirst("8080", "7070"));
+ //((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURLHttps + "SecurityService2322").replaceFirst("8443", "7070"));
assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) SAML2.0 Sender Vouches over SSL"));
}
11 years