Permalink
Comparing changes
Open a pull request
- 2 commits
- 10 files changed
- 0 commit comments
- 2 contributors
Commits on Apr 05, 2019
…g subsystem pom and module.xml Also clean out unneeded code, including switches that can be simple if/else blocks.
Unified
Split
Showing
with
189 additions
and 306 deletions.
- +1 −21 feature-pack/src/main/resources/modules/system/layers/base/org/jboss/as/messaging/main/module.xml
- +45 −48 legacy/messaging/pom.xml
- +0 −2 legacy/messaging/src/main/java/org/jboss/as/messaging/AbstractTransportDefinition.java
- +31 −39 legacy/messaging/src/main/java/org/jboss/as/messaging/Messaging13SubsystemParser.java
- +8 −12 legacy/messaging/src/main/java/org/jboss/as/messaging/Messaging20SubsystemParser.java
- +92 −147 legacy/messaging/src/main/java/org/jboss/as/messaging/MessagingSubsystemParser.java
- +0 −5 legacy/messaging/src/main/java/org/jboss/as/messaging/Namespace.java
- +1 −2 legacy/messaging/src/main/java/org/jboss/as/messaging/PathDefinition.java
- +0 −19 legacy/messaging/src/main/java/org/jboss/as/messaging/jms/ConnectionFactoryAttribute.java
- +11 −11 legacy/messaging/src/main/java/org/jboss/as/messaging/logging/MessagingLogger.java
| @@ -32,31 +32,11 @@ | ||
| </resources> | ||
|
|
||
| <dependencies> | ||
| <module name="javax.api"/> | ||
| <module name="javax.enterprise.api"/> | ||
| <module name="javax.jms.api"/> | ||
| <module name="javax.transaction.api"/> | ||
| <module name="org.jboss.common-beans"/> | ||
| <module name="org.jboss.staxmapper"/> | ||
| <!-- required to provide high-level JMS CLI commands loaded by the extension --> | ||
| <module name="org.jboss.as.cli" /> | ||
| <!-- controller module exports dmr and controller-client, which we also use --> | ||
| <module name="org.jboss.as.controller"/> | ||
| <module name="org.jboss.as.ee"/> | ||
| <module name="org.jboss.as.naming"/> | ||
| <module name="org.jboss.as.network"/> | ||
| <module name="org.wildfly.security.elytron-private"/> | ||
| <module name="org.jboss.as.server"/> | ||
| <module name="org.jboss.as.weld"/> | ||
| <module name="org.jboss.jandex"/> | ||
| <module name="org.jboss.metadata.common"/> | ||
| <module name="org.jboss.modules"/> | ||
| <module name="org.jboss.msc"/> | ||
| <module name="org.jboss.logging"/> | ||
| <module name="org.jboss.as.connector" /> | ||
| <module name="org.jboss.as.security"/> | ||
| <module name="org.jboss.vfs"/> | ||
| <module name="org.picketbox"/> | ||
| <module name="org.jboss.jboss-transaction-spi"/> | ||
| <module name="org.wildfly.naming-client"/> | ||
| </dependencies> | ||
| </module> | ||
| @@ -42,66 +42,55 @@ | ||
| <name>WildFly: (Legacy) Messaging Subsystem</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.jboss.msc</groupId> | ||
| <artifactId>jboss-msc</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.wildfly.core</groupId> | ||
| <artifactId>wildfly-cli</artifactId> | ||
| <exclusions> | ||
| <exclusion> | ||
| <groupId>*</groupId> | ||
| <artifactId>*</artifactId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.wildfly.core</groupId> | ||
| <artifactId>wildfly-controller</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.wildfly.security</groupId> | ||
| <artifactId>wildfly-elytron</artifactId> | ||
| <artifactId>wildfly-controller</artifactId> | ||
| <exclusions> | ||
| <exclusion> | ||
| <groupId>*</groupId> | ||
| <artifactId>*</artifactId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.jboss.spec.javax.jms</groupId> | ||
| <artifactId>jboss-jms-api_2.0_spec</artifactId> | ||
| </dependency> | ||
|
|
||
| <groupId>org.wildfly.core</groupId> | ||
| <artifactId>wildfly-controller-client</artifactId> | ||
| <exclusions> | ||
| <exclusion> | ||
| <groupId>*</groupId> | ||
| <artifactId>*</artifactId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>wildfly-connector</artifactId> | ||
| </dependency> | ||
|
|
||
| <groupId>org.jboss</groupId> | ||
| <artifactId>staxmapper</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>wildfly-naming</artifactId> | ||
| <groupId>org.jboss</groupId> | ||
| <artifactId>jboss-dmr</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.wildfly.core</groupId> | ||
| <artifactId>wildfly-network</artifactId> | ||
| <groupId>org.jboss.logging</groupId> | ||
| <artifactId>jboss-logging</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>wildfly-transactions</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>wildfly-clustering-jgroups-spi</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>wildfly-web-common</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>wildfly-weld</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.jboss.logging</groupId> | ||
| <artifactId>jboss-logging-annotations</artifactId> | ||
| @@ -120,11 +109,6 @@ | ||
| <optional>true</optional> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.jboss.common</groupId> | ||
| <artifactId>jboss-common-beans</artifactId> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>junit</groupId> | ||
| <artifactId>junit</artifactId> | ||
| @@ -134,7 +118,13 @@ | ||
| <dependency> | ||
| <groupId>org.wildfly.core</groupId> | ||
| <artifactId>wildfly-subsystem-test</artifactId> | ||
| <type>pom</type> | ||
| <type>pom</type> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>wildfly-clustering-jgroups-spi</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| @@ -143,5 +133,12 @@ | ||
| <artifactId>wildfly-messaging-activemq</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.projectodd.vdx</groupId> | ||
| <artifactId>vdx-core</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| </dependencies> | ||
| </project> | ||
| @@ -38,7 +38,6 @@ | ||
| */ | ||
| public abstract class AbstractTransportDefinition extends ModelOnlyResourceDefinition { | ||
|
|
||
| private final AttributeDefinition[] attrs; | ||
| protected final boolean isAcceptor; | ||
|
|
||
| protected AbstractTransportDefinition(final boolean isAcceptor, final String specificType, AttributeDefinition... attrs) { | ||
| @@ -52,7 +51,6 @@ public String getResourceDescription(Locale locale, ResourceBundle bundle) { | ||
| }, | ||
| attrs); | ||
| this.isAcceptor = isAcceptor; | ||
| this.attrs = attrs; | ||
| setDeprecated(MessagingExtension.DEPRECATED_SINCE); | ||
| } | ||
|
|
||
| @@ -307,14 +307,11 @@ private void processRemotingIncomingInterceptors(XMLExtendedStreamReader reader, | ||
| requireNoAttributes(reader); | ||
| while(reader.hasNext() && reader.nextTag() != END_ELEMENT) { | ||
| final Element element = Element.forName(reader.getLocalName()); | ||
| switch (element) { | ||
| case CLASS_NAME: { | ||
| final String value = reader.getElementText(); | ||
| REMOTING_INCOMING_INTERCEPTORS.parseAndAddParameterElement(value, operation, reader); | ||
| break; | ||
| } default: { | ||
| throw ParseUtils.unexpectedElement(reader); | ||
| } | ||
| if (element == Element.CLASS_NAME) { | ||
| final String value = reader.getElementText(); | ||
| REMOTING_INCOMING_INTERCEPTORS.parseAndAddParameterElement(value, operation, reader); | ||
| } else { | ||
| throw unexpectedElement(reader); | ||
| } | ||
| } | ||
| } | ||
| @@ -323,45 +320,40 @@ private void processRemotingOutgoingInterceptors(XMLExtendedStreamReader reader, | ||
| requireNoAttributes(reader); | ||
| while(reader.hasNext() && reader.nextTag() != END_ELEMENT) { | ||
| final Element element = Element.forName(reader.getLocalName()); | ||
| switch (element) { | ||
| case CLASS_NAME: { | ||
| final String value = reader.getElementText(); | ||
| REMOTING_OUTGOING_INTERCEPTORS.parseAndAddParameterElement(value, operation, reader); | ||
| break; | ||
| } default: { | ||
| throw ParseUtils.unexpectedElement(reader); | ||
| } | ||
| if (element == Element.CLASS_NAME) { | ||
| final String value = reader.getElementText(); | ||
| REMOTING_OUTGOING_INTERCEPTORS.parseAndAddParameterElement(value, operation, reader); | ||
| } else { | ||
| throw unexpectedElement(reader); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private void processContext(XMLExtendedStreamReader reader, ModelNode context) throws XMLStreamException { | ||
| while (reader.hasNext() && reader.nextTag() != END_ELEMENT) { | ||
| final Element element = Element.forName(reader.getLocalName()); | ||
| switch (element) { | ||
| case PROPERTY: | ||
| int count = reader.getAttributeCount(); | ||
| String key = null; | ||
| String value = null; | ||
| for (int n = 0; n < count; n++) { | ||
| String attrName = reader.getAttributeLocalName(n); | ||
| Attribute attribute = Attribute.forName(attrName); | ||
| switch (attribute) { | ||
| case KEY: | ||
| key = reader.getAttributeValue(n); | ||
| break; | ||
| case VALUE: | ||
| value = reader.getAttributeValue(n); | ||
| break; | ||
| default: | ||
| throw unexpectedAttribute(reader, n); | ||
| } | ||
| if (element == Element.PROPERTY) { | ||
| int count = reader.getAttributeCount(); | ||
| String key = null; | ||
| String value = null; | ||
| for (int n = 0; n < count; n++) { | ||
| String attrName = reader.getAttributeLocalName(n); | ||
| Attribute attribute = Attribute.forName(attrName); | ||
| switch (attribute) { | ||
| case KEY: | ||
| key = reader.getAttributeValue(n); | ||
| break; | ||
| case VALUE: | ||
| value = reader.getAttributeValue(n); | ||
| break; | ||
| default: | ||
| throw unexpectedAttribute(reader, n); | ||
| } | ||
| context.get(key).set(value); | ||
| ParseUtils.requireNoContent(reader); | ||
| break; | ||
| default: | ||
| throw ParseUtils.unexpectedElement(reader); | ||
| } | ||
| context.get(key).set(value); | ||
| ParseUtils.requireNoContent(reader); | ||
| } else { | ||
| throw unexpectedElement(reader); | ||
| } | ||
| } | ||
| } | ||
| @@ -225,24 +225,20 @@ protected void handleUnknownBridgeAttribute(XMLExtendedStreamReader reader, Elem | ||
|
|
||
| @Override | ||
| protected void handleUnknownAddressSetting(XMLExtendedStreamReader reader, Element element, ModelNode addressSettingsAdd) throws XMLStreamException { | ||
| switch (element) { | ||
| case EXPIRY_DELAY: | ||
| handleElementText(reader, element, addressSettingsAdd); | ||
| break; | ||
| default: | ||
| super.handleUnknownAddressSetting(reader, element, addressSettingsAdd); | ||
| if (element == Element.EXPIRY_DELAY) { | ||
| handleElementText(reader, element, addressSettingsAdd); | ||
| } else { | ||
| super.handleUnknownAddressSetting(reader, element, addressSettingsAdd); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| @Override | ||
| protected void handleUnknownClusterConnectionAttribute(XMLExtendedStreamReader reader, Element element, ModelNode clusterConnectionAdd) throws XMLStreamException { | ||
| switch (element) { | ||
| case INITIAL_CONNECT_ATTEMPTS: | ||
| handleElementText(reader, element, "cluster", clusterConnectionAdd); | ||
| break; | ||
| default: | ||
| super.handleUnknownClusterConnectionAttribute(reader, element, clusterConnectionAdd); | ||
| if (element == Element.INITIAL_CONNECT_ATTEMPTS) { | ||
| handleElementText(reader, element, "cluster", clusterConnectionAdd); | ||
| } else { | ||
| super.handleUnknownClusterConnectionAttribute(reader, element, clusterConnectionAdd); | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.