on 06-03-2009 9:55 AM
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.
It works now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.