0 Replies Latest reply on May 24, 2012 5:27 AM by Daniel Yang

    RF 4.1 Final custom topicListener not work.

    Daniel Yang Novice

      I found that add listener method all types of SessionTopicListener2(SessionTopicListenerWrapper).


      In AbstractTopic.java

       public void addTopicListener(TopicListener topicListener) {
      TopicListener listener = topicListener;  
      if (listener instanceof SessionTopicListener) {
      listener = new SessionTopicListenerWrapper((SessionTopicListener) listener);


      and trigger it use this method.


          public void publishEvent(TopicEvent event) {
              for (TopicListener listener : listeners) {
                  if (event.isAppropriateListener(listener)) {
                      try {
                      } catch (Exception e) {


      the method marked blue in SessionTopicEvent.java returns false.


          public boolean isAppropriateListener(EventListener listener) {
              return (listener instanceof SessionTopicListener);


      so custom listener not work, maybe "SessionTopicListener"  should be replaced by "SessionTopicListener2". I don't test it.

      Richfaces guys please take a look at this. Thanks.


      消息编辑者为:Daniel Yang