[snmp] Context Listeners and Enterprise Beans
Birgit Arkesteijn
birgit at westhawk.co.uk
Thu Mar 6 11:20:57 GMT 2008
Hi,
I thought about a bit more:
Looking at AbstractSnmpContext.run(), I notice that at the end it stops
listening on ListeningContextFace.DEFAULT_TRAP_PORT (162):
ListeningContextPool lcontext =
new ListeningContextPool(ListeningContextFace.DEFAULT_TRAP_PORT,
bindAddr, typeSocket);
lcontext.removeRawPduListenerFromPool(this);
The loop in run() should stop a bit after destroy() is called.
This should mean that calling destroy() on a context should be enough.
Apparently it doesn't, what surprises me.
Cheers, Birgit
On 05/03/08 18:58, Josh Bers wrote:
> Andy,
>
> I've run into this problem as well. If I remember right, you have to be very
> careful about removing all trap listeners from a context. The trick is to
> specify the same port number on which you originally setup the trap listener
> in the remove method. If you don't specify the port then the default method
> does not remove it from port 162...
>
> Josh
>
> -----Original Message-----
> From: snmp-bounces at snmp.westhawk.co.uk
> [mailto:snmp-bounces at snmp.westhawk.co.uk] On Behalf Of Andrew Chandler
> Sent: Wednesday, March 05, 2008 12:06 PM
> To: snmp at snmp.westhawk.co.uk
> Cc: Andrew Maxwell
> Subject: [snmp] Context Listeners and Enterprise Beans
>
> 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