Skip to content

Commit

Permalink
[WFLY-19051] Remove Stage.RUNTIME uses of capability 'org.wildfly.leg…
Browse files Browse the repository at this point in the history
…acy-security' in messaging subsystem
  • Loading branch information
soul2zimate committed Feb 20, 2024
1 parent 3996822 commit 2d59a54
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected void execute(DeploymentProcessorTarget processorTarget) {
// keep the statements ordered by phase + priority
processorTarget.addDeploymentProcessor(MessagingExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_JMS_CONNECTION_FACTORY_RESOURCE_INJECTION, new DefaultJMSConnectionFactoryResourceReferenceProcessor());
processorTarget.addDeploymentProcessor(MessagingExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_RESOURCE_DEF_ANNOTATION_JMS_DESTINATION, new JMSDestinationDefinitionAnnotationProcessor());
processorTarget.addDeploymentProcessor(MessagingExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_RESOURCE_DEF_ANNOTATION_JMS_CONNECTION_FACTORY, new JMSConnectionFactoryDefinitionAnnotationProcessor(MessagingServices.capabilityServiceSupport.hasCapability("org.wildfly.legacy-security")));
processorTarget.addDeploymentProcessor(MessagingExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_RESOURCE_DEF_ANNOTATION_JMS_CONNECTION_FACTORY, new JMSConnectionFactoryDefinitionAnnotationProcessor());
processorTarget.addDeploymentProcessor(MessagingExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_MESSAGING_XML_RESOURCES, new MessagingXmlParsingDeploymentUnitProcessor());
processorTarget.addDeploymentProcessor(MessagingExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_JMS, new MessagingDependencyProcessor());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ public class JMSConnectionFactoryDefinitionAnnotationProcessor extends ResourceD
private static final DotName JMS_CONNECTION_FACTORY_DEFINITION = DotName.createSimple(JMSConnectionFactoryDefinition.class.getName());
private static final DotName JMS_CONNECTION_FACTORY_DEFINITIONS = DotName.createSimple(JMSConnectionFactoryDefinitions.class.getName());

private final boolean legacySecurityAvailable;

public JMSConnectionFactoryDefinitionAnnotationProcessor(boolean legacySecurityAvailable) {
this.legacySecurityAvailable = legacySecurityAvailable;
}

@Override
protected DotName getAnnotationDotName() {
return JMS_CONNECTION_FACTORY_DEFINITION;
Expand All @@ -56,7 +50,6 @@ protected ResourceDefinitionInjectionSource processAnnotation(AnnotationInstance
directJMSConnectionFactoryInjectionSource.setTransactional(AnnotationElement.asOptionalBoolean(annotationInstance, "transactional"));
directJMSConnectionFactoryInjectionSource.setMaxPoolSize(AnnotationElement.asOptionalInt(annotationInstance, "maxPoolSize", MAX_POOL_SIZE.getDefaultValue().asInt()));
directJMSConnectionFactoryInjectionSource.setMinPoolSize(AnnotationElement.asOptionalInt(annotationInstance, "minPoolSize", MIN_POOL_SIZE.getDefaultValue().asInt()));
directJMSConnectionFactoryInjectionSource.setLegacySecurityAvailable(legacySecurityAvailable);
directJMSConnectionFactoryInjectionSource.addProperties(AnnotationElement.asOptionalStringArray(annotationInstance, AnnotationElement.PROPERTIES), propertyReplacer);
return directJMSConnectionFactoryInjectionSource;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public class JMSConnectionFactoryDefinitionInjectionSource extends ResourceDefin
private boolean transactional;
private int maxPoolSize;
private int minPoolSize;
private boolean legacySecurityAvailable;

public JMSConnectionFactoryDefinitionInjectionSource(String jndiName) {
super(jndiName);
Expand Down Expand Up @@ -151,10 +150,6 @@ void setMinPoolSize(int minPoolSize) {
this.minPoolSize = minPoolSize;
}

public void setLegacySecurityAvailable(boolean legacySecurityAvailable) {
this.legacySecurityAvailable = legacySecurityAvailable;
}

@Override
public void getResourceValue(ResolutionContext context, ServiceBuilder<?> serviceBuilder, DeploymentPhaseContext phaseContext, Injector<ManagedReferenceFactory> injector) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
Expand Down

0 comments on commit 2d59a54

Please sign in to comment.