3 Replies Latest reply on Apr 14, 2016 2:41 AM by magnus.lundgren

    Subtopic missing in SubscriptionEvent (richfaces 4.5.9)?

    magnus.lundgren

      Hi,

       

      Working on a upgrade from JBoss 7.1.1 to Wildfly10 including a small jump to Richfaces 4.5.9 from 4.3.5.

      I have a SessionTopicListener2 installed in which does a basic security check of the subtopic for my push functionality, but the subtopic is missing after the upgrade.

       

      public void processPreSubscriptionEvent(SessionPreSubscriptionEvent sessionPreSubscriptionEvent) {

        String requestedSubTopic = sessionPreSubscriptionEvent.getTopicKey().getSubtopicName();

        //requestedSubTopic  always null

       

      I debugged the code and in SessionImpl.createSubscriptions(Iterable<TopicKey> topicKeys) the subtopic is present in "topicKey", but then the code ignores and

      ask the topic to do checkSubscription without using the topicKey, and thus the subtopic is lost:


      private void createSubscriptions(Iterable<TopicKey> topicKeys) {

        Iterator var2 = topicKeys.iterator();

         while(var2.hasNext()) {

           TopicKey topicKey = (TopicKey)var2.next(); //hold the subtopic

           Topic pushTopic = this.topicsContext.getOrCreateTopic(topicKey); //does not hold the subtopic obviously

           String errorMessage = null;

           if(pushTopic == null) {

             errorMessage = MessageFormat.format("Topic \'\'{0}\'\' is not configured", new Object[]{topicKey.getTopicAddress()});

           } else {

              try {

                  pushTopic.checkSubscription(this); //subtopic lost

      ...

       

      So is this a bug or not? Are the subscription events on topic level or on subtopic level?

       

      --

      Regards

       

      Magnus