[jboss-jira] [JBoss JIRA] (JBMETA-386) Deployment fails when jboss-web.xml contains <enable-websockets>true</enable-websockets>
Ladislav Thon (JIRA)
issues at jboss.org
Thu Jun 4 02:53:03 EDT 2015
[ https://issues.jboss.org/browse/JBMETA-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073978#comment-13073978 ]
Ladislav Thon commented on JBMETA-386:
--------------------------------------
I found this problem just yesterday, independently from Radim. I think that this patch would have been enough, but whatever :-) Thanks for fixing it!
{code}
diff --git a/web/src/main/java/org/jboss/metadata/parser/jbossweb/JBossWebMetaDataParser.java b/web/src/main/java/org/jboss/metadata/parser/jbossweb/JBossWebMetaDataParser.java
index 73a30ed..ab306af 100644
--- a/web/src/main/java/org/jboss/metadata/parser/jbossweb/JBossWebMetaDataParser.java
+++ b/web/src/main/java/org/jboss/metadata/parser/jbossweb/JBossWebMetaDataParser.java
@@ -58,7 +58,8 @@ import org.jboss.metadata.web.jboss.ValveMetaData;
public class JBossWebMetaDataParser extends MetaDataElementParser {
private static final Logger log = Logger.getLogger(JBossWebMetaDataParser.class);
private static final Set<String> DEPRECATED_ELEMENTS = new HashSet<>(Arrays.asList(
- "passivation-config"
+ "passivation-config",
+ "enable-websockets" // supported in EAP 6
));
public static JBossWebMetaData parse(XMLStreamReader reader, PropertyReplacer propertyReplacer) throws XMLStreamException {
@@ -272,10 +273,7 @@ public class JBossWebMetaDataParser extends MetaDataElementParser {
default: {
if (DEPRECATED_ELEMENTS.contains(localName)) {
log.warnf("<%s/> is no longer supported and will be ignored", localName);
- // Skip any nested content
- while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
- reader.getElementText();
- }
+ consumeElementContent(reader);
} else {
throw unexpectedElement(reader);
}
{code}
> Deployment fails when jboss-web.xml contains <enable-websockets>true</enable-websockets>
> ----------------------------------------------------------------------------------------
>
> Key: JBMETA-386
> URL: https://issues.jboss.org/browse/JBMETA-386
> Project: JBoss Metadata
> Issue Type: Bug
> Components: web
> Affects Versions: 8.1.1.Final
> Reporter: Radim Hatlapatka
> Assignee: Stuart Douglas
> Priority: Minor
> Fix For: 10.0.0.Beta2
>
>
> When deploying application with WebSockets used in EAP 6 to EAP 7, deployment will fail due EAP7 not supporting [1] in jboss-web.xml. The {{<enable-websockets>}} element is required in EAP 6 to enable the WebSockets functionality in JBoss Web.
> This element should be also allowed in EAP 7 in order to simplify migration from EAP 6. Functionality of {{ <enable-websockets>true</enable-websockets>}} can be ignored as in EAP 7 and in Undertow there is no need to enable WebSockets explicitly.
> [1]
> {code:xml}
> <jboss-web version="7.2"
> xmlns="http://www.jboss.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee schema/jboss-web_7_2.xsd">
> <enable-websockets>true</enable-websockets>
> </jboss-web>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list