From: <jbo...@li...> - 2006-07-10 14:45:42
|
Author: adamw Date: 2006-07-10 10:45:33 -0400 (Mon, 10 Jul 2006) New Revision: 4964 Modified: labs/shotoku/trunk/shotoku-base/shotoku-base.iml labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml labs/shotoku/trunk/shotoku-file-access/shotoku-file-access.iml labs/shotoku/trunk/shotoku-files/shotoku-files.iml labs/shotoku/trunk/shotoku-jcr/shotoku-jcr.iml labs/shotoku/trunk/shotoku-portal/shotoku-portal.iml labs/shotoku/trunk/shotoku-svn/shotoku-svn.iml labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnRepository.java labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java labs/shotoku/trunk/shotoku-tags/shotoku-tags.iml labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java labs/shotoku/trunk/shotoku-test/shotoku-test.iml labs/shotoku/trunk/shotoku-web/shotoku-web.iml labs/shotoku/trunk/shotoku.iml Log: http://jira.jboss.org/jira/browse/JBSHOTOKU-87 Modified: labs/shotoku/trunk/shotoku-base/shotoku-base.iml =================================================================== --- labs/shotoku/trunk/shotoku-base/shotoku-base.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-base/shotoku-base.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -5,14 +5,11 @@ <output url="file://$MODULE_DIR$/target" /> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/etc" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="velocity" level="application" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="library" name="commons" level="application" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/AdministratedServiceImpl.java 2006-07-10 14:45:33 UTC (rev 4964) @@ -8,7 +8,7 @@ * @author Adam Warski (ad...@as...) */ public abstract class AdministratedServiceImpl implements AdministratedService { - private static final Logger log = Logger.getLogger(AdministratedServiceImpl.class); + private static final Logger log = Logger.getLogger(AdministratedService.class); private long lastUpdate; private long timerInterval; @@ -54,6 +54,7 @@ public void stop() { log.info("Stopping " + getServiceName() + "..."); setServiceRunnable(false); + log.info(getServiceName() + " stopped."); } public void destroy() { Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/service/ShotokuServiceImpl.java 2006-07-10 14:45:33 UTC (rev 4964) @@ -47,7 +47,7 @@ @Management(ShotokuService.class) public class ShotokuServiceImpl extends AdministratedServiceImpl implements ShotokuService, ShotokuServiceLocal { - Logger log = Logger.getLogger(ShotokuServiceImpl.class); + Logger log = Logger.getLogger(AdministratedService.class); /* * Service-handling functions. @@ -111,11 +111,6 @@ log.info("Shotoku service started."); } - public void stop() { - super.stop(); - log.info("Shotoku service stopped."); - } - public void destroy() { } Modified: labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml =================================================================== --- labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-feeds/shotoku-feeds.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,15 +9,10 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="shotoku" /> - <orderEntry type="module" module-name="shotoku-aop" /> <orderEntry type="module" module-name="shotoku-base" /> + <orderEntry type="module" module-name="shotoku-aop" /> <orderEntry type="library" name="feeds" level="application" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="library" name="commons" level="application" /> - <orderEntry type="library" name="velocity" level="application" /> - <orderEntry type="library" name="junit" level="application" /> - <orderEntry type="module" module-name="shotoku-tags" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-file-access/shotoku-file-access.iml =================================================================== --- labs/shotoku/trunk/shotoku-file-access/shotoku-file-access.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-file-access/shotoku-file-access.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,8 +9,8 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="shotoku-aop" /> <orderEntry type="module" module-name="shotoku-base" /> - <orderEntry type="module" module-name="shotoku-aop" /> <orderEntry type="library" name="jboss" level="application" /> <orderEntryProperties /> </component> Modified: labs/shotoku/trunk/shotoku-files/shotoku-files.iml =================================================================== --- labs/shotoku/trunk/shotoku-files/shotoku-files.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-files/shotoku-files.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,8 +9,8 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="shotoku-aop" /> <orderEntry type="module" module-name="shotoku-base" /> - <orderEntry type="library" name="commons" level="application" /> <orderEntry type="library" name="jboss" level="application" /> <orderEntryProperties /> </component> Modified: labs/shotoku/trunk/shotoku-jcr/shotoku-jcr.iml =================================================================== --- labs/shotoku/trunk/shotoku-jcr/shotoku-jcr.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-jcr/shotoku-jcr.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,11 +9,10 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="jcr" level="application" /> - <orderEntry type="module" module-name="shotoku-base" /> <orderEntry type="module" module-name="shotoku-aop" /> + <orderEntry type="module" module-name="shotoku-base" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="library" name="commons" level="application" /> + <orderEntry type="library" name="jcr" level="application" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-portal/shotoku-portal.iml =================================================================== --- labs/shotoku/trunk/shotoku-portal/shotoku-portal.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-portal/shotoku-portal.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,9 +9,10 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="shotoku-aop" /> + <orderEntry type="module" module-name="shotoku-base" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="library" name="portal-cms" level="application" /> - <orderEntry type="module" module-name="shotoku-base" /> + <orderEntry type="library" name="portal" level="application" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-svn/shotoku-svn.iml =================================================================== --- labs/shotoku/trunk/shotoku-svn/shotoku-svn.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-svn/shotoku-svn.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,10 +9,10 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="shotoku-aop" /> <orderEntry type="module" module-name="shotoku-base" /> - <orderEntry type="library" name="tmate" level="application" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="library" name="commons" level="application" /> + <orderEntry type="library" name="svn" level="application" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnRepository.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnRepository.java 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnRepository.java 2006-07-10 14:45:33 UTC (rev 4964) @@ -135,6 +135,17 @@ } /** + * Gets the number of the last revision to which the WC was updated to. + */ + public long getLastRevision() { + return lastRevision; + } + + public String getId() { + return id; + } + + /** * Tries to perform a cleanup on the local working copy. Called in case * of exceptions that occure while performing other operations. */ Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java 2006-07-10 14:45:33 UTC (rev 4964) @@ -56,7 +56,7 @@ @Depends(Constants.SHOTOKU_SERVICE_NAME) public class SvnServiceImpl extends AdministratedServiceImpl implements SvnService, SvnServiceLocal { - private static final Logger log = Logger.getLogger(SvnServiceImpl.class); + private static final Logger log = Logger.getLogger(AdministratedService.class); private ConcurrentMap<String, SvnRepository> repositories; @@ -115,6 +115,7 @@ try { update(); } catch (Throwable t) { + log.debug("SVN update threw an exception.", t); // Making sure that an exception won't stop the thread. } @@ -128,11 +129,6 @@ log.info("Subversion Service started with update interval: "+ getTimerInterval()); } - public void stop() { - super.stop(); - log.info("Subversion Service signaled to stop."); - } - public void destroy() { } @@ -141,13 +137,22 @@ */ public void update() { + log.debug("Starting SVN update."); for (SvnRepository repo : repositories.values()) { try { + log.debug("Updating repository: " + repo.getId() + + "; revision number before update: " + + repo.getLastRevision() + "."); repo.update(); + log.debug("Finished updating repository: " + repo.getId() + + "; revision number after update: " + + repo.getLastRevision() + "."); } catch (Exception e) { - log.error("Exception while updating a repository.", e); + log.error("Exception while updating repository: " + + repo.getId() + ".", e); } } + log.debug("Ending SVN update."); } public String getServiceId() { @@ -161,7 +166,8 @@ public String getServiceDescription() { StringBuffer sb = new StringBuffer("These repositories are currently handled: "); for (String id : repositories.keySet()) { - sb.append(id).append(" "); + sb.append(id).append(" ("). + append(repositories.get(id).getLastRevision()).append("); "); } return sb.append(".").toString(); Modified: labs/shotoku/trunk/shotoku-tags/shotoku-tags.iml =================================================================== --- labs/shotoku/trunk/shotoku-tags/shotoku-tags.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-tags/shotoku-tags.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -12,7 +12,6 @@ <orderEntry type="module" module-name="shotoku-aop" /> <orderEntry type="module" module-name="shotoku-base" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="library" name="commons" level="application" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java =================================================================== --- labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 14:45:33 UTC (rev 4964) @@ -62,7 +62,7 @@ @Depends(Constants.SHOTOKU_SERVICE_NAME) public class TagServiceImpl extends AdministratedServiceImpl implements TagService, TagServiceLocal { - private static final Logger log = Logger.getLogger(TagService.class); + private static final Logger log = Logger.getLogger(AdministratedService.class); /* * Service lifecycle management. @@ -118,11 +118,6 @@ + getTimerInterval()); } - public void stop() { - super.stop(); - log.info("Tag service signaled to stop."); - } - public void destroy() { } Modified: labs/shotoku/trunk/shotoku-test/shotoku-test.iml =================================================================== --- labs/shotoku/trunk/shotoku-test/shotoku-test.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-test/shotoku-test.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,15 +9,9 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="shotoku-base" /> <orderEntry type="module" module-name="shotoku-aop" /> - <orderEntry type="library" name="junit" level="application" /> + <orderEntry type="module" module-name="shotoku-base" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="module" module-name="shotoku-files" /> - <orderEntry type="module" module-name="shotoku-jcr" /> - <orderEntry type="module" module-name="shotoku-svn" /> - <orderEntry type="library" name="etc" level="project" /> - <orderEntry type="library" name="jcr" level="application" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku-web/shotoku-web.iml =================================================================== --- labs/shotoku/trunk/shotoku-web/shotoku-web.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku-web/shotoku-web.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -9,9 +9,9 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="jsf" level="application" /> + <orderEntry type="module" module-name="shotoku-aop" /> + <orderEntry type="module" module-name="shotoku-base" /> <orderEntry type="library" name="jboss" level="application" /> - <orderEntry type="module" module-name="shotoku-base" /> <orderEntryProperties /> </component> </module> Modified: labs/shotoku/trunk/shotoku.iml =================================================================== --- labs/shotoku/trunk/shotoku.iml 2006-07-10 02:18:06 UTC (rev 4963) +++ labs/shotoku/trunk/shotoku.iml 2006-07-10 14:45:33 UTC (rev 4964) @@ -2,16 +2,9 @@ <module version="4" relativePaths="true" type="JAVA_MODULE"> <component name="ModuleRootManager" /> <component name="NewModuleRootManager"> - <output url="file://$MODULE_DIR$/target" /> + <output url="file://$MODULE_DIR$" /> <exclude-output /> - <content url="file://$MODULE_DIR$"> - <excludeFolder url="file://$MODULE_DIR$/shotoku-aop" /> - <excludeFolder url="file://$MODULE_DIR$/shotoku-base" /> - <excludeFolder url="file://$MODULE_DIR$/shotoku-files" /> - <excludeFolder url="file://$MODULE_DIR$/shotoku-jcr" /> - <excludeFolder url="file://$MODULE_DIR$/shotoku-svn" /> - <excludeFolder url="file://$MODULE_DIR$/shotoku-test" /> - </content> + <content url="file://$MODULE_DIR$" /> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntryProperties /> |