ICEpush
  1. ICEpush
  2. PUSH-350

JBoss EAP 6.3.0 uses '.' and '-' in JMS property names which causes a PropertyException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02, EE-4.0.0.GA
    • Fix Version/s: EE-4.0.0.GA, EE-3.3.0.GA_P03
    • Component/s: Push Server
    • Labels:
      None
    • Environment:
      JBoss EAP 6.3.0 Cluster, ICEfaces-EE, EPS, Poll

      Description

      Our IdentifierValidator throws a PropertyException when encountering '.' and/or '-' characters in JMS property names. The property in question here originates from JBoss EAP 6.3.0 itself.

        Activity

        Hide
        Jack Van Ooststroom added a comment -

        Backported the fix to EE-3 as well.

        Show
        Jack Van Ooststroom added a comment - Backported the fix to EE-3 as well.
        Hide
        Jack Van Ooststroom added a comment -

        Sending eps/src/main/java/com/icesoft/net/messaging/AbstractMessage.java
        Sending eps/src/main/java/com/icesoft/net/messaging/IdentifierValidator.java
        Sending eps/src/main/java/com/icesoft/net/messaging/MessageSeparator.java
        Sending eps/src/main/java/com/icesoft/net/messaging/MessageServiceClient.java
        Sending eps/src/main/java/com/icesoft/net/messaging/ObjectMessage.java
        Sending eps/src/main/java/com/icesoft/net/messaging/TextMessage.java
        Sending eps/src/main/java/com/icesoft/net/messaging/jms/JMSAdapter.java
        Sending eps/src/main/java/com/icesoft/net/messaging/jms/JMSSubscriberConnection.java
        Transmitting file data ........
        Committed revision 41481.

        Show
        Jack Van Ooststroom added a comment - Sending eps/src/main/java/com/icesoft/net/messaging/AbstractMessage.java Sending eps/src/main/java/com/icesoft/net/messaging/IdentifierValidator.java Sending eps/src/main/java/com/icesoft/net/messaging/MessageSeparator.java Sending eps/src/main/java/com/icesoft/net/messaging/MessageServiceClient.java Sending eps/src/main/java/com/icesoft/net/messaging/ObjectMessage.java Sending eps/src/main/java/com/icesoft/net/messaging/TextMessage.java Sending eps/src/main/java/com/icesoft/net/messaging/jms/JMSAdapter.java Sending eps/src/main/java/com/icesoft/net/messaging/jms/JMSSubscriberConnection.java Transmitting file data ........ Committed revision 41481.
        Hide
        Jack Van Ooststroom added a comment - - edited

        The ServletContext is now getting passed down the chain to allow for ServerUtility.isJBoss7(ServletContext) checking. Dependent on the outcome the '.' and/or '-' characters are allowed when in a JBoss AS 7 environment, which includes JBoss EAP 6.3.0.

        Despite the Java Message Service specification saying that these characters are not allowed in a property name:

        JMS 1.1:

        "3.5.1 Property Names
        Property names must obey the rules for a message selector identifier. See
        Section 3.8.1.1, “Message Selector Syntax,” for more information.

        Identifiers:

        • An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This includes ‘_’ and ‘$’. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true."

        JMS 2.0:

        "3.5.1. Property names
        Property names must obey the rules for a message selector identifier. See Section 3.8 “Message selection” for more information.

        Identifiers:

        • An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This
          includes '_' and '$'. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true."

        Sources:

        As all of the following return false it should not be allowed:

        • Character.isJavaIdentifierStart('.')
        • Character.isJavaIdentifierStart('-')
        • Character.isJavaIdentifierPart('.')
        • Character.isJavaIdentifierPart('-')

        As ICEpush-EE has an abstracted layer for dealing with messages it enforces these rules outside of the Message Broker. For now the exception for JBoss AS 7 has been added. Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - - edited The ServletContext is now getting passed down the chain to allow for ServerUtility.isJBoss7(ServletContext) checking. Dependent on the outcome the '.' and/or '-' characters are allowed when in a JBoss AS 7 environment, which includes JBoss EAP 6.3.0. Despite the Java Message Service specification saying that these characters are not allowed in a property name: JMS 1.1: "3.5.1 Property Names Property names must obey the rules for a message selector identifier. See Section 3.8.1.1, “Message Selector Syntax,” for more information. Identifiers: An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true . This includes ‘_’ and ‘$’. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true ." JMS 2.0: "3.5.1. Property names Property names must obey the rules for a message selector identifier. See Section 3.8 “Message selection” for more information. Identifiers: An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true . This includes '_' and '$'. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true." Sources: http://download.oracle.com/otndocs/jcp/7195-jms-1.1-fr-spec-oth-JSpec/ http://download.oracle.com/otndocs/jcp/jms-2_0-fr-spec/index.html As all of the following return false it should not be allowed: Character.isJavaIdentifierStart('.') Character.isJavaIdentifierStart('-') Character.isJavaIdentifierPart('.') Character.isJavaIdentifierPart('-') As ICEpush-EE has an abstracted layer for dealing with messages it enforces these rules outside of the Message Broker. For now the exception for JBoss AS 7 has been added. Marking this one as FIXED.
        Hide
        Jack Van Ooststroom added a comment - - edited

        Sending src/main/java/com/icesoft/net/messaging/AbstractMessage.java
        Transmitting file data .
        Committed revision 41283.

        Show
        Jack Van Ooststroom added a comment - - edited Sending src/main/java/com/icesoft/net/messaging/AbstractMessage.java Transmitting file data . Committed revision 41283.
        Hide
        Jack Van Ooststroom added a comment -

        Sending src/main/java/com/icesoft/net/messaging/IdentifierValidator.java
        Sending src/main/java/com/icesoft/net/messaging/MessageSeparator.java
        Sending src/main/java/com/icesoft/net/messaging/MessageServiceClient.java
        Sending src/main/java/com/icesoft/net/messaging/ObjectMessage.java
        Sending src/main/java/com/icesoft/net/messaging/TextMessage.java
        Sending src/main/java/com/icesoft/net/messaging/jms/JMSAdapter.java
        Sending src/main/java/com/icesoft/net/messaging/jms/JMSSubscriberConnection.java
        Transmitting file data .......
        Committed revision 41282.

        Show
        Jack Van Ooststroom added a comment - Sending src/main/java/com/icesoft/net/messaging/IdentifierValidator.java Sending src/main/java/com/icesoft/net/messaging/MessageSeparator.java Sending src/main/java/com/icesoft/net/messaging/MessageServiceClient.java Sending src/main/java/com/icesoft/net/messaging/ObjectMessage.java Sending src/main/java/com/icesoft/net/messaging/TextMessage.java Sending src/main/java/com/icesoft/net/messaging/jms/JMSAdapter.java Sending src/main/java/com/icesoft/net/messaging/jms/JMSSubscriberConnection.java Transmitting file data ....... Committed revision 41282.

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Jack Van Ooststroom
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: