Skip to content

Commit

Permalink
Copy REJECTION_RULE attachment from DeploymentUnit to JBossWS SPI Dep…
Browse files Browse the repository at this point in the history
…loyment
  • Loading branch information
asoldano authored and Gytis Trikleris committed Nov 24, 2016
1 parent 97a1287 commit 00faace
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import static org.jboss.as.webservices.util.WSAttachmentKeys.DEPLOYMENT_KEY;
import static org.jboss.as.webservices.util.WSAttachmentKeys.JAXWS_ENDPOINTS_KEY;
import static org.jboss.as.webservices.util.WSAttachmentKeys.JBOSS_WEBSERVICES_METADATA_KEY;
import static org.jboss.as.webservices.util.WSAttachmentKeys.REJECTION_RULE_KEY;
import static org.jboss.as.webservices.util.WSAttachmentKeys.WEBSERVICES_METADATA_KEY;

import org.jboss.as.ejb3.deployment.EjbDeploymentAttachmentKeys;
Expand All @@ -50,6 +51,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointType;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.invocation.RejectionRule;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;

Expand Down Expand Up @@ -117,6 +119,12 @@ private void propagateAttachments(final DeploymentUnit unit, final ArchiveDeploy

final EjbJarMetaData ejbJarMD = getOptionalAttachment(unit, EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
dep.addAttachment(EjbJarMetaData.class, ejbJarMD);

final RejectionRule rr = getOptionalAttachment(unit, REJECTION_RULE_KEY);
if (rr != null) {
dep.addAttachment(RejectionRule.class, rr);

}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.jboss.metadata.ear.jboss.JBossAppMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.invocation.RejectionRule;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
Expand All @@ -54,6 +55,7 @@ public final class WSAttachmentKeys {
public static final AttachmentKey<WSEndpointHandlersMapping> WS_ENDPOINT_HANDLERS_MAPPING_KEY = AttachmentKey.create(WSEndpointHandlersMapping.class);
public static final AttachmentKey<WSEndpointConfigMapping> WS_ENDPOINT_CONFIG_MAPPING_KEY = AttachmentKey.create(WSEndpointConfigMapping.class);
public static final AttachmentKey<ServerConfig> SERVER_CONFIG_KEY = AttachmentKey.create(ServerConfig.class);
public static final AttachmentKey<RejectionRule> REJECTION_RULE_KEY = AttachmentKey.create(RejectionRule.class);

private WSAttachmentKeys() {
// forbidden inheritance
Expand Down

0 comments on commit 00faace

Please sign in to comment.