You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by vv...@apache.org on 2010/03/31 14:17:52 UTC
svn commit: r929495 -
/felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java
Author: vvalchev
Date: Wed Mar 31 12:17:51 2010
New Revision: 929495
URL: http://svn.apache.org/viewvc?rev=929495&view=rev
Log:
fixed a small problem with unregistering the listener
Modified:
felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java
Modified: felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java?rev=929495&r1=929494&r2=929495&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java (original)
+++ felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java Wed Mar 31 12:17:51 2010
@@ -128,7 +128,18 @@ final class SessionObject implements Htt
vars.clear();
if (reg != null)
{
- reg.unregister();
+ try
+ {
+ reg.unregister();
+ }
+ catch (Throwable t)
+ {
+ // When the bundle is stopped, the session object might remain hanging
+ // in the session, until it expires. After being stopped, the framework
+ // however will automatically destroy the registration. But after session
+ // expires this method will be called once again and will try to
+ // unregister the service. This will throw exception, that should be caught.
+ }
reg = null;
}
return this;