You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Jackson, Jen (CCI-Atlanta)" <Je...@cox.com> on 2003/06/27 20:43:39 UTC
ThreadLocal Call objects using in a servlet memory leak ?
Has anyone else noticed that if you create an org.apache.axis.client.Call in a servlet in tomcat, it consumes a thread and never dies? I seem to think this is because of the ThreadLocal references throughout the classes. Is there something we can do to avoid this? I am only following the documentation on how to use it, and calling the generated code from a servlet:
try {
EdgeHealthPortType port = getService().getEdgeHealthPort();
modem = (String) map.get(UsageKeys.MODEM_MAC_ADDRESS_KEY);
//this is the generated function, which creates an org.apache.axis.client.Call object,
//which gets somehow stuck in tomcat's threadpool forever.......
usageToday = port.getModemCurrentUsage(modem);
}
catch (javax.xml.rpc.ServiceException se) {
throwError(
modem,
se,
UsageKeys.ERROR_CURRENT_USAGE_NOT_AVAILABLE_KEY);
}
catch (java.rmi.RemoteException re) {
throwError(
modem,
re,
UsageKeys.ERROR_CURRENT_USAGE_NOT_AVAILABLE_KEY);
}
And ideas? Anyone else experience this? I used Jprofiler to diagnose this.
Jennifer Jackson
Programmer/Analyst