Author: richard.opalka(a)jboss.com
Date: 2008-05-23 12:04:05 -0400 (Fri, 23 May 2008)
New Revision: 7153
Modified:
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
Log:
fix memory leak - always unregister listener, log undeployment errors
Modified:
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java
===================================================================
---
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java 2008-05-23
16:01:54 UTC (rev 7152)
+++
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java 2008-05-23
16:04:05 UTC (rev 7153)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.container.jboss50.transport;
+import org.jboss.logging.Logger;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.wsf.framework.transport.HttpListenerRef;
import org.jboss.wsf.spi.SPIProvider;
@@ -46,6 +47,7 @@
*/
public class EJBHttpTransportManager implements TransportManager
{
+ private static Logger log = Logger.getLogger(EJBHttpTransportManager.class);
private static final String PROCESSED_BY_DEPLOYMENT_FACTORY =
"processed.by.deployment.factory";
private WebAppDeploymentFactory deploymentFactory;
private WebAppGenerator generator;
@@ -91,10 +93,7 @@
{
String ctx = httpSpec.getWebContext();
String pattern = httpSpec.getUrlPattern();
- listenerRef = new HttpListenerRef(
- ctx, pattern,
- new URI("http://"+hostAndPort+ctx+pattern)
- );
+ listenerRef = new HttpListenerRef(ctx, pattern, new URI("http://" +
hostAndPort + ctx + pattern));
}
catch (URISyntaxException e)
{
@@ -120,13 +119,14 @@
{
deploymentFactory.destroy(dep);
}
- finally
+ catch (Exception e)
{
- deploymentRegistry.remove(ref.getUUID());
+ log.error(e.getMessage(), e);
}
dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
}
}
+ deploymentRegistry.remove(ref.getUUID());
}
public void setDeploymentFactory(WebAppDeploymentFactory deploymentFactory)
Modified:
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
---
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-23
16:01:54 UTC (rev 7152)
+++
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-23
16:04:05 UTC (rev 7153)
@@ -46,7 +46,6 @@
import javax.xml.ws.WebServiceException;
import java.net.URI;
import java.net.URISyntaxException;
-import java.net.URL;
import java.util.Map;
import java.util.HashMap;
@@ -55,6 +54,7 @@
*/
public class EndpointAPIHttpTransportManager implements TransportManager
{
+ private static Logger log = Logger.getLogger(EndpointAPIHttpTransportManager.class);
private static final String PROCESSED_BY_DEPLOYMENT_FACTORY =
"processed.by.deployment.factory";
private WebAppDeploymentFactory deploymentFactory;
private WebAppGenerator generator;
@@ -100,7 +100,7 @@
{
String ctx = httpSpec.getWebContext();
String pattern = httpSpec.getUrlPattern();
- listenerRef = new HttpListenerRef( ctx, pattern, new
URI("http://"+hostAndPort+ctx+pattern) );
+ listenerRef = new HttpListenerRef(ctx, pattern, new URI("http://" +
hostAndPort + ctx + pattern));
}
catch (URISyntaxException e)
{
@@ -128,15 +128,23 @@
try
{
undeploy(dep);
+ }
+ catch (Exception e)
+ {
+ log.error(e.getMessage(), e);
+ }
+ try
+ {
deploymentFactory.destroy(dep);
}
- finally
+ catch (Exception e)
{
- deploymentRegistry.remove(ref.getUUID());
+ log.error(e.getMessage(), e);
}
dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
}
}
+ deploymentRegistry.remove(ref.getUUID());
}
public void setDeploymentFactory(WebAppDeploymentFactory deploymentFactory)
Show replies by date