Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@minotaur.apache.org Received: (qmail 60836 invoked from network); 5 Apr 2009 12:20:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Apr 2009 12:20:23 -0000 Received: (qmail 39762 invoked by uid 500); 5 Apr 2009 12:20:21 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 39720 invoked by uid 500); 5 Apr 2009 12:20:21 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 39710 invoked by uid 99); 5 Apr 2009 12:20:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Apr 2009 12:20:21 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harry.metske@gmail.com designates 209.85.128.189 as permitted sender) Received: from [209.85.128.189] (HELO fk-out-0910.google.com) (209.85.128.189) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Apr 2009 12:20:13 +0000 Received: by fk-out-0910.google.com with SMTP id z22so643329fkz.12 for ; Sun, 05 Apr 2009 05:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=JV7PZheUGS4SVOlWADk2S31nZ8C1deBwsPvGrBKKiTQ=; b=LFaDKDDxeYALDZas7MtFPVlTbnMUFz2j2V+PxCRl1DPL/kbMVW2MGMh1teKdoitujU Y+GyDOZvfhCQp2ApTsNTV44E+zgbGOI0EIpWzcDCTpx0JK5ywhW4/kfw/aL4+SGez5La Eu6c6qkAtn0r35ZUfCLokPPBKoUmzb9xct+Ds= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=v8iFXhx7iT6rR6qVljhsuYx259+lFunrBpQFrz5LYvuCCdpyD1w+uEslMnLp02nHmR ah1sLtC8bFRmbrG06bguMdjPEbYpwOH15IaNtuhHnhHs3E5fz0DEvf0R8qYGd+o3PVga D1jT3ftHubPaH3paIaQfsbCTdVVhteBANbo7s= MIME-Version: 1.0 Received: by 10.223.123.210 with SMTP id q18mr475381far.63.1238933991436; Sun, 05 Apr 2009 05:19:51 -0700 (PDT) In-Reply-To: <4332497F-BF8F-41CD-9806-937011BA7F34@ecyrd.com> References: <20090405120853.340A7238896D@eris.apache.org> <4332497F-BF8F-41CD-9806-937011BA7F34@ecyrd.com> Date: Sun, 5 Apr 2009 14:19:51 +0200 Message-ID: <3a6c97f00904050519r627cfe8ctc7170820a610714e@mail.gmail.com> Subject: Re: svn commit: r762074 - in /incubator/jspwiki/trunk: ./ src/java/org/apache/wiki/ src/java/org/apache/wiki/action/ src/java/org/apache/wiki/search/ src/java/org/apache/wiki/util/ From: Harry Metske To: jspwiki-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=001636988a0b75b1280466cdcce4 X-Virus-Checked: Checked by ClamAV on apache.org --001636988a0b75b1280466cdcce4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit coming up (and some minor correction) 2009/4/5 Janne Jalkanen > > Nice, thanks! Any chance you could port the thread dump code to 2.8.3 as > well? > > /Janne > > > On 5 Apr 2009, at 15:08, metskem@apache.org wrote: > > Author: metskem >> Date: Sun Apr 5 12:08:52 2009 >> New Revision: 762074 >> >> URL: http://svn.apache.org/viewvc?rev=762074&view=rev >> Log: >> * 3.0.0-svn-93 >> >> * added some code to Watchdog so that the stacktrace is dumped in >> case of >> a timeout, we dump stacktraces of all threads if the debuglevel >> is >> INFO or higher >> * got rid of some javadoc errors >> >> Modified: >> incubator/jspwiki/trunk/ChangeLog >> incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java >> incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java >> >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java >> >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/UploadActionBean.java >> >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/ViewActionBean.java >> >> incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchMatcher.java >> incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WatchDog.java >> >> Modified: incubator/jspwiki/trunk/ChangeLog >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- incubator/jspwiki/trunk/ChangeLog (original) >> +++ incubator/jspwiki/trunk/ChangeLog Sun Apr 5 12:08:52 2009 >> @@ -1,3 +1,12 @@ >> +2009-04-05 Harry Metske >> + >> + * 3.0.0-svn-93 >> + >> + * added some code to Watchdog so that the stacktrace is dumped in >> case of >> + a timeout, we dump stacktraces of all threads if the >> debuglevel is >> + INFO or higher >> + * got rid of some javadoc errors >> + >> 2009-04-04 Janne Jalkanen >> >> * 3.0.0-svn-92 >> >> Modified: >> incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java >> (original) >> +++ incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java Sun >> Apr 5 12:08:52 2009 >> @@ -26,20 +26,15 @@ >> import javax.jcr.*; >> import javax.jcr.lock.LockException; >> import javax.jcr.nodetype.ConstraintViolationException; >> -import javax.jcr.version.Version; >> import javax.jcr.version.VersionException; >> >> -import org.apache.wiki.api.WikiException; >> import org.apache.wiki.api.WikiPage; >> import org.apache.wiki.attachment.Attachment; >> import org.apache.wiki.auth.acl.Acl; >> -import org.apache.wiki.auth.acl.AclEntry; >> -import org.apache.wiki.auth.acl.AclImpl; >> import org.apache.wiki.content.ContentManager; >> import org.apache.wiki.content.PageNotFoundException; >> import org.apache.wiki.content.WikiName; >> import org.apache.wiki.providers.ProviderException; >> -import org.apache.wiki.providers.WikiPageProvider; >> >> >> /** >> @@ -140,8 +135,8 @@ >> /** >> * Direct access to JCR Properties. >> * >> - * @param key >> - * @return >> + * @param key the key for which we want the property >> + * @return Property >> * @throws PathNotFoundException >> * @throws RepositoryException >> */ >> >> Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java >> (original) >> +++ incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java Sun >> Apr 5 12:08:52 2009 >> @@ -1096,7 +1096,7 @@ >> *

If the page is a special page, then returns a direct URL >> * to that page. Otherwise returns null. >> * This method delegates requests to >> - * {@link >> org.apache.wiki.action.WikiContextFactory#getSpecialPageResolution(String)}. >> + * {@link >> org.apache.wiki.action.WikiContextFactory#getSpecialPageURI}. >> *

>> *

>> * Special pages are defined in jspwiki.properties using the >> jspwiki.specialPage >> >> Modified: >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java >> (original) >> +++ >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java >> Sun Apr 5 12:08:52 2009 >> @@ -431,7 +431,7 @@ >> * Sets a flag indicating that new page text should be appended to the >> old >> * text. >> * >> - * @param true if text should be appended; >> false >> + * @param append true if text should be appended; >> false >> * otherwise (the default). >> */ >> @Validate( required = false ) >> @@ -492,7 +492,7 @@ >> * {@link HtmlStringToWikiTranslator}. Calling this method causes >> * {@link #setText(String)} to be called, with the translated text >> supplied. >> * >> - * @param the HTML to translate >> + * @param html the HTML to translate >> * @throws JDOMException if the HTML cannot be translated >> * @throws IOException if the HtmlStringToWikiTranslator cannot >> translated >> * the text >> >> Modified: >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/UploadActionBean.java >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/UploadActionBean.java?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/UploadActionBean.java >> (original) >> +++ >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/UploadActionBean.java >> Sun Apr 5 12:08:52 2009 >> @@ -100,7 +100,7 @@ >> /** >> * Handler method that uploads a new attachment to the ViewActionBean. >> * >> - * @return >> + * @return Resolution >> */ >> @HandlesEvent( "upload" ) >> @HandlerPermission( permissionClass = PagePermission.class, target = >> "${page.qualifiedName}", actions = PagePermission.UPLOAD_ACTION ) >> >> Modified: >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/ViewActionBean.java >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/ViewActionBean.java?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/ViewActionBean.java >> (original) >> +++ >> incubator/jspwiki/trunk/src/java/org/apache/wiki/action/ViewActionBean.java >> Sun Apr 5 12:08:52 2009 >> @@ -112,7 +112,7 @@ >> * special page names from jspwiki.properties, and >> possible >> * aliases. To determine whether the page is a special page, this >> method >> * calls >> - * {@link >> org.apache.wiki.action.WikiContextFactory#getSpecialPageResolution(String)}. >> + * {@link >> org.apache.wiki.action.WikiContextFactory#getSpecialPageURI(String)}. >> * >> * @return a {@link net.sourceforge.stripes.action.RedirectResolution} >> to >> * the special page's real URL, if a special page was >> specified, or >> >> Modified: >> incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchMatcher.java >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchMatcher.java?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- >> incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchMatcher.java >> (original) >> +++ >> incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchMatcher.java >> Sun Apr 5 12:08:52 2009 >> @@ -167,7 +167,7 @@ >> /** >> * Create a new SearchResult with a given name and a score. >> * >> - * @param name Page Name >> + * @param page Page Name >> * @param score A score from 0+ >> */ >> public SearchResultImpl( WikiPage page, int score ) >> >> Modified: >> incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WatchDog.java >> URL: >> http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WatchDog.java?rev=762074&r1=762073&r2=762074&view=diff >> >> ============================================================================== >> --- incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WatchDog.java >> (original) >> +++ incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WatchDog.java >> Sun Apr 5 12:08:52 2009 >> @@ -304,12 +304,10 @@ >> >> if( now > st.getExpiryTime() ) >> { >> - log.info("Watchable '"+m_watchable.getName()+ >> - "' exceeded timeout in state '"+ >> - st.getState()+ >> - "' by "+ >> - (now-st.getExpiryTime())/1000+" seconds"); >> + log.info( "Watchable '" + m_watchable.getName() + "' >> exceeded timeout in state '" + st.getState() + "' by " >> + + (now - st.getExpiryTime()) / 1000 + " >> seconds" ); >> >> + dumpStackTraceForWatchable(); >> m_watchable.timeoutExceeded( st.getState() ); >> } >> } >> @@ -320,6 +318,28 @@ >> } >> } >> >> + private void dumpStackTraceForWatchable() >> + { >> + Map stackTraces = >> Thread.getAllStackTraces(); >> + Set threads = stackTraces.keySet(); >> + Iterator threadIterator = threads.iterator(); >> + while ( threadIterator.hasNext() ) >> + { >> + Thread t = (Thread) threadIterator.next(); >> + if( t.getName().equals( m_watchable.getName() ) || >> log.isInfoEnabled() ) >> + { >> + log.error( "dumping stacktrace for too long running >> thread : " + t ); >> + StackTraceElement[] ste = stackTraces.get( t ); >> + StringBuilder stacktrace = new StringBuilder( "stacktrace >> follows" ); >> + for( int i = 0; i < ste.length; i++ ) >> + { >> + stacktrace.append( "\n" + ste[i] ); >> + } >> + log.error( stacktrace.toString() ); >> + } >> + } >> + } >> + >> /** >> * Strictly for debugging/informative purposes. >> * >> >> > --001636988a0b75b1280466cdcce4--