/**
  * Returns {@code true} if this factory is available. The default implementation returns {@code
  * false} if no backing store were setup and {@link DeferredAuthorityFactory#createBackingStore}
  * throws an exception.
  */
 @Override
 synchronized boolean isAvailable() {
   try {
     return getBackingStore().isAvailable();
   } catch (FactoryNotFoundException exception) {
     /*
      * The factory is not available. This is error may be normal; it happens
      * for example if no gt2-epsg-hsql.jar (or similar JAR) are found in the
      * classpath, which is the case for example in GeoServer 1.3. Do not log
      * any stack trace,  since stack traces suggest more serious errors than
      * what we really have here.
      */
   } catch (FactoryException exception) {
     /*
      * The factory creation failed for an other reason, which may be more
      * serious. Now it is time to log a warning with a stack trace.
      */
     final Citation citation = getAuthority();
     final Collection titles = citation.getAlternateTitles();
     InternationalString title = citation.getTitle();
     if (titles != null) {
       for (final Iterator it = titles.iterator(); it.hasNext(); ) {
         /*
          * Uses the longuest title instead of the main one. In Geotools
          * implementation, the alternate title may contains usefull informations
          * like the EPSG database version number and the database engine.
          */
         final InternationalString candidate = (InternationalString) it.next();
         if (candidate.length() > title.length()) {
           title = candidate;
         }
       }
     }
     final LogRecord record =
         Loggings.format(Level.WARNING, LoggingKeys.UNAVAILABLE_AUTHORITY_FACTORY_$1, title);
     record.setSourceClassName(getClass().getName());
     record.setSourceMethodName("isAvailable");
     record.setThrown(exception);
     record.setLoggerName(LOGGER.getName());
     LOGGER.log(record);
   }
   return false;
 }