jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "ExamplesPage" by ThomasMueller
Date Mon, 19 Oct 2009 14:33:08 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The "ExamplesPage" page has been changed by ThomasMueller.
http://wiki.apache.org/jackrabbit/ExamplesPage?action=diff&rev1=29&rev2=30

--------------------------------------------------

  === Jackrabbit Cache Configuration ===
  This info has moved to the CacheManager page.
  
+ === Is the Repository Running? ==
+ 
+ {{{
+ /**
+  * Check if a repository is currently running. This only works when
+  * using the CooperativeFileLock, see
+  * http://wiki.apache.org/jackrabbit/RepositoryLock
+  */
+ static boolean isRepositoryRunning(String repositoryHome) {
+     File lock = new File(repositoryHome + "/lock.properties");
+     if (lock.exists()) {
+         lock.delete();
+     }
+     try {
+         Thread.sleep(2000);
+     } catch (Exception e) {
+         throw new RuntimeException(e);
+     }
+     return lock.exists();
+ }
+ }}}
+ 
  == See also ==
  
   * [[EncodingAndEscaping]]

Mime
View raw message