ASF Bugzilla – Attachment 14186 Details for
Bug 33368
swallowOutput causes memory leak
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use ThreadPoolListener - avoid thread memory leak
patch_channelsocket.txt (text/plain), 1.60 KB, created by
Rainer Jung
on 2005-02-05 05:05:37 UTC
(
hide
)
Description:
Use ThreadPoolListener - avoid thread memory leak
Filename:
MIME Type:
Creator:
Rainer Jung
Created:
2005-02-05 05:05:37 UTC
Size:
1.60 KB
patch
obsolete
>diff -wc ./jk/java/org/apache/jk/common/ChannelSocket.java.orig ./jk/java/org/apache/jk/common/ChannelSocket.java >*** ./jk/java/org/apache/jk/common/ChannelSocket.java.orig Thu Jun 17 21:03:20 2004 >--- ./jk/java/org/apache/jk/common/ChannelSocket.java Sat Feb 5 04:32:21 2005 >*************** >*** 403,408 **** >--- 403,410 ---- > } > } > >+ tp.addThreadPoolListener(new MXPoolListener()); >+ > tp.start(); > SocketAcceptor acceptAjp=new SocketAcceptor( this ); > tp.runIt( acceptAjp); >*************** >*** 830,837 **** >--- 832,857 ---- > public MBeanNotificationInfo[] getNotificationInfo() { > return notifInfo; > } >+ >+ >+ class MXPoolListener implements ThreadPool.ThreadPoolListener { >+ >+ MXPoolListener( ) { > } > >+ public void threadStart(ThreadPool tp, Thread t) { >+ if( log.isDebugEnabled()) log.debug("Adding thread " + t + " to SystemLogHandler"); >+ org.apache.tomcat.util.log.SystemLogHandler.addThread(t); >+ } >+ >+ public void threadEnd(ThreadPool tp, Thread t) { >+ if( log.isDebugEnabled()) log.debug("Removing thread " + t + " from SystemLogHandler"); >+ org.apache.tomcat.util.log.SystemLogHandler.removeThread(t); >+ } >+ } >+ >+ } >+ > class SocketAcceptor implements ThreadPoolRunnable { > ChannelSocket wajp; > >*************** >*** 864,868 **** >--- 884,890 ---- > > public void runIt(Object perTh[]) { > wajp.processConnection(ep); >+ ep=null; > } >+ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 33368
:
14184
|
14185
|
14186
|
14187
|
14189
|
14190
|
14191