Skip to Content
avatar image
Former Member

EventDispatcher and ServerEvent- event doesnt function

Hi,

I am trying to implement the AbstractServerListener and had registeredServerNotification for the eventdispatcher,but still the server event does not function properly.

EventDispatcher eventDispatcher = new EventDispatcher(cmnProxyServices.serverHostName);

eventDispatcher.addListener(new AbstractServerListener() {

@Override

public void repositoryMounted(ServerEvent event) {

System.out.println("repository mounted");

doSomething();//.....

}

@Override

public void repositoryUnmounted(ServerEvent event) {

System.out.println("repository unmounted");

doSomething();//.....

}

}

);

eventDispatcher.registerServerNotifications("", ""); //no server userid and passwd defeined hence empty

Eventhough the server is registered when i unmount and mount the repository no action is trigered.

My application with the above code is running in SAP NW application server and the MDM server is runnning differently.So EventDispatcher runs but not action(server event) is taken place when i do unmount and mount of repository.

Any idea would be helpful.

Thanks

Sabarinathan.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 03, 2009 at 04:15 PM

    Hi,

    Hi,

    Instead of using SYSO , try to use write test messages to logfile.

    Code listener class with implementing ServerListener s

    (Class ListenerExample implements ServerListener{

    }),

    pas instance of this class to EventDispatcher.addListener method.

    Hope this helps you.

    Cheers,

    Veeru.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Thanks for your comments,but you need to use eventdispatcher.registerGlobalNotifications() inorder to trigger the events.

      It works this way..

      cheers

      Sabarinathan

  • avatar image
    Former Member
    Jun 15, 2009 at 01:17 PM

    It works now.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi,now i against the same problem with you ,i want to use EventDispatcher to monitor the import event use port,but now i my listener can not receive the event too! can you help me?thank you!

      the following is my code segment:

      EventDispatcher ed = new EventDispatcher("...");

      ed.registerRepositoryNotifications("Admin", "123", rep.repId);

      ed.registerGlobalNotifications();

      ed.addListener(new ImportListener());

      the class ImportListener have implemented the supper interface RepositoryListener.