0 Replies Latest reply on Jan 11, 2008 4:22 AM by Advait

    Using PortalNodeEvent on 2.6.2

    Advait Newbie

      I am trying to use PortalNodeEvents by implementing PortalNodeEventListener. I have written this class:

      public class MframePortalListener implements PortalNodeEventListener
      {
       public PortalNodeEvent onEvent(PortalNodeEventContext context,
       PortalNodeEvent event) {
       System.out.println("MframePortalListener GOT EVENT:"+event.toString());
       return event;
       }
      }


      I have also put this class in jar file and jar file is available under jboss-portal-2.6.2.GA\server\default\deploy\jboss-portal.sar\lib

      I am adding this entry to jboss-portal-2.6.2.GA\server\default\deploy\jboss-portal.sar\META-INF\jboss-server.xml

      
       <mbean
       code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
       name="portal:service=ListenerService,type=mframePortalListener"
       xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
       <xmbean/>
       <depends
       optional-attribute-name="Registry"
       proxy-type="attribute">portal:service=ListenerRegistry</depends>
       <attribute name="RegistryId">mframePortalListener</attribute>
       <attribute name="ListenerClassName">
       com.sis.mframeopen.listener.MframePortalListener
       </attribute>
       </mbean>
      


      But I am not getting SOP which I have put in the code, when login to portal, click on some page and do some interaction with one of the portlets. But If I implement PortalEventListener I do get SOP:

      [STDOUT] MframePortalListener GOT EVENT:org.jboss.portal.api.session.event.PortalSessionEvent@2e6640

      I am PortalNodeEventListener do get a names of portlets deployed on current page, somehow, using PortalNodeEventContext. Is there any other way?