|
Home > Archive > WebSphere Edge Server > January 2004 > How to ease Custom Advisor development ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to ease Custom Advisor development ?
|
|
|
| Hello,
I'm currently developping a Custom Advisor for Network Dispatcher. The fact
is that I have to stop and restart ND to see the changes in my Java code
taken into account (stop and start the Manager doesn't have any effect).
Needless to say this is a pain...
How can I solve this problem ? Except develop bug free code :-)
Thanks.
Ben.
| |
|
| Ben,
The custom advisor classes are loaded when the ndserver process first
starts up. Later changes are not read unless you restart the process.
If you don't use any of the custom advisor APIs (getCluster(), etc),
then you could add a main() method to your advisor that opens the socket
with the server and then calls your getLoad() method. That would allow
faster, easier testing. If you do use ND APIs (logging, querying
values, etc), then you'd have to run it in the ND framework or I suppose
stub out those methods and do cleanup when you're ready to put it in ND.
Note: you only need to stop ndserver, restart it, start the manager,
start the advisor. You do not need to stop the executor or reload any
of the rest of the configuration. The Java ndserver only controls the
manager and advisors.
I usually just write a script that stops ND, and handles the restart and
reload of mgr/advisor (ndcontrol file appendload X... for example).
Jeff
|
|
|
|
|