[Asterisk-java-users] "refreshing" AGI server on asterisk's reload
Brought to you by:
srt
From: wardsback <war...@no...> - 2006-07-20 09:39:12
|
Hi there guys I'm now doing some more tests. Successfully running an AGI server and starting to play with scripts. As I'm often modifying my main Java class (the one that gets called accordingly to fastAGI mappings), I need the AGI server to be aware of class changes. On first shot I just manually stopped and relaunched my AGIserver. Then I had the idea to use Asterisk's reload command and an AGImanager in wich I watch for "net.sf.asterisk.manager.event.ReloadEvent" events. So each time such an event is recieved, I decided to shutdown current server, spawn a new one, and start it up. This way of doing does work (only once, though. i.e. server doesn't get shutdown and respawned on subsenquent Asterisk's "reloads"). Plus, something tells me I'm not doing it the "right" way. Any hints ? -- Fred |