Mark servlet as unavailable if the ARP Engine cannot start up.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 31 Jan 2003 03:19:31 +0000 (03:19 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 31 Jan 2003 03:19:31 +0000 (03:19 +0000)
Change example config parameter to full path.
Better log message.

git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@437 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AAServlet.java
src/edu/internet2/middleware/shibboleth/aa/arp/provider/FileSystemArpRepository.java
webApplication/WEB-INF/conf/origin.properties

index c9ff8ee..47ad1ff 100755 (executable)
@@ -117,8 +117,10 @@ public class AAServlet extends HttpServlet {
                        log.fatal("AA init failed: " + ne);
                        throw new ServletException("Init failed: " + ne);
                } catch (ArpException ae) {
-                       log.fatal("AA init failed: " + ae);
-                       throw new ServletException("Init failed: " + ae);
+                       log.fatal(
+                               "Attribute Authority could not be initialized due to a problem with the ARP Engine configuration: "
+                                       + ae);
+                       throw new UnavailableException("Attribute Authority failed to initialize.");
                } catch (AAException ae) {
                        log.fatal("AA init failed: " + ae);
                        throw new ServletException("Init failed: " + ae);
@@ -133,7 +135,7 @@ public class AAServlet extends HttpServlet {
                Properties defaultProps = new Properties();
                defaultProps.setProperty(
                        "edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path",
-                       getServletContext().getRealPath("/WEB-INF/conf/arps"));
+                       getServletContext().getRealPath("/WEB-INF/conf/arps/"));
                defaultProps.setProperty(
                        "edu.internet2.middleware.shibboleth.aa.arp.ArpRepository.implementation",
                        "edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository");
index 67cd2ca..55392ce 100755 (executable)
@@ -98,14 +98,14 @@ public class FileSystemArpRepository extends BaseArpRepository implements ArpRep
                                        "edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path"));
                if (!givenPath.isDirectory()) {
                        log.error(
-                               "Cannot initialize FileSystemArpRepository: specified path is not a directory.");
+                               "Cannot initialize FileSystemArpRepository: specified path is not a directory: ("
+                                       + givenPath.getPath()
+                                       + ").");
                        throw new ArpRepositoryException("Cannot initialize FileSystemArpRepository");
                }
 
                log.info(
-                       "Initializing File System Arp Repository with a root of ("
-                               + givenPath.getAbsolutePath()
-                               + ").");
+                       "Initializing File System Arp Repository with a root of (" + givenPath.getAbsolutePath() + ").");
                dataStorePath =
                        props.getProperty(
                                "edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path");
index 07ae220..2f2b8d0 100755 (executable)
@@ -1,5 +1,6 @@
-edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path = /WEB-INF/conf/arps
-
+#Full Path to ARP repository
+#edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path = \
+       /opt/local/tomcat/webapps/shibboleth/WEB-INF/conf/arps/
 edu.internet2.middleware.shibboleth.aa.arp.ArpRepository.implementation = \
        edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository