[snmp] Context Listeners and Enterprise Beans

Birgit Arkesteijn birgit at westhawk.co.uk
Wed Mar 5 18:06:09 GMT 2008


Hi Andy,

I assume they add the trap listener to the context?

So:
SnmpContextX context = new SnmpContextX(..);
context.addTrapListener(this, ListeningContextPool.DEFAULT_TRAP_PORT);

They should call:
context.removeTrapListener(this, ListeningContextPool.DEFAULT_TRAP_PORT);

Port 162 will remain open as long as there is a single listener.
In order to remove all listeners, use
ListeningContextPool.destroyPool()

There was a bug in earlier versions with the listener object.
Version 4.14 solved:
- Destroying a context no longer creates a listener object that listens 
for incoming traps (or PDUs in general).

We haven't had report of new bugs regarding to the ListenerContext(Pool).

Hope the above helps.

Cheers, Birgit


On 05/03/08 17:05, Andrew Chandler wrote:
> Hi folks - one of our other development groups has had to create a trap
> listener which is a part of the stack I haven't really used much.    What
> they have run into is that the trap listener is in the J2EE Bean and when
> they go to redeploy the port 162 isn't being relinquished.     They do have
> code on deploy that says if the context isn't null they should call destroy
> on it but I can't remember what circumstances could cause that port to be
> locked open even temporarily - is there anything we should be watching out
> for?
>  
> 

-- 
-- Birgit Arkesteijn, birgit at westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>


More information about the snmp mailing list