Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@minotaur.apache.org Received: (qmail 54365 invoked from network); 5 Apr 2009 12:17:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Apr 2009 12:17:56 -0000 Received: (qmail 36962 invoked by uid 500); 5 Apr 2009 12:17:56 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 36909 invoked by uid 500); 5 Apr 2009 12:17:56 -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 36899 invoked by uid 99); 5 Apr 2009 12:17:56 -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:17:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of janne.jalkanen@ecyrd.com designates 193.64.5.122 as permitted sender) Received: from [193.64.5.122] (HELO mail.ecyrd.com) (193.64.5.122) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Apr 2009 12:17:47 +0000 Received: from [192.168.0.12] (cs181005170.pp.htv.fi [82.181.5.170]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.ecyrd.com (Postfix) with ESMTPSA id C212397C14A for ; Sun, 5 Apr 2009 15:17:25 +0300 (EEST) Message-Id: <4332497F-BF8F-41CD-9806-937011BA7F34@ecyrd.com> From: Janne Jalkanen To: jspwiki-dev@incubator.apache.org In-Reply-To: <20090405120853.340A7238896D@eris.apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) 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/ Date: Sun, 5 Apr 2009 15:17:24 +0300 References: <20090405120853.340A7238896D@eris.apache.org> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org 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. > * >