cancel
Showing results for 
Search instead for 
Did you mean: 

EventDispatcher and ServerEvent- event doesnt function

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

It works now.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

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

It works this way..

cheers

Sabarinathan