jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r385460 - in /incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee: RepositoryAccessServlet.java RepositoryStartupServlet.java
Date Mon, 13 Mar 2006 08:34:22 GMT
Author: angela
Date: Mon Mar 13 00:34:20 2006
New Revision: 385460

URL: http://svn.apache.org/viewcvs?rev=385460&view=rev
Log:
fixing indention

Modified:
    incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
    incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java

Modified: incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java?rev=385460&r1=385459&r2=385460&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
(original)
+++ incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
Mon Mar 13 00:34:20 2006
@@ -71,7 +71,7 @@
      * @throws javax.servlet.ServletException
      */
     public void init() throws ServletException {
-	log.info("RepositoryAccessServlet initializing...");
+        log.info("RepositoryAccessServlet initializing...");
         // fetching the name
         String repositoryName = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_NAME);
         if (repositoryName == null) {
@@ -85,17 +85,17 @@
         // setup initial context
         getServletContext().setAttribute(CTX_ATTR_REPOSITORY_JNDI_CONTEXT, getInitialContext());
 
-	log.info("RepositoryAccessServlet initialized.");
+        log.info("RepositoryAccessServlet initialized.");
     }
 
     private InitialContext getInitialContext() {
-	// retrieve JNDI Context environment
-	try {
-	    Properties env = new Properties();
-	    Enumeration names = getServletConfig().getInitParameterNames();
-	    while (names.hasMoreElements()) {
-		String name = (String) names.nextElement();
-		if (name.startsWith("java.naming.")) {
+        // retrieve JNDI Context environment
+        try {
+            Properties env = new Properties();
+            Enumeration names = getServletConfig().getInitParameterNames();
+            while (names.hasMoreElements()) {
+                String name = (String) names.nextElement();
+                if (name.startsWith("java.naming.")) {
                     String initParam = getServletConfig().getInitParameter(name);
                     if (initParam.equals("")) {
                         log.info("  ignoring empty JNDI init param: " + name);
@@ -103,18 +103,18 @@
                         env.put(name, initParam);
                         log.info("  adding property to JNDI environment: " + name + "=" +
initParam);
                     }
-		}
-	    }
-	    return new InitialContext(env);
-	} catch (NamingException e) {
-	    log.error("Create initial context: " + e.toString());
-	    return null;
-	}
+                }
+            }
+            return new InitialContext(env);
+        } catch (NamingException e) {
+            log.error("Create initial context: " + e.toString());
+            return null;
+        }
     }
 
     private String getRMIUri() {
-	// setup repository name
-	return getServletConfig().getInitParameter(INIT_PARAM_RMI_URI);
+        // setup repository name
+        return getServletConfig().getInitParameter(INIT_PARAM_RMI_URI);
     }
 
     /**
@@ -204,7 +204,7 @@
 abstract class ClientFactoryDelegater {
 
     public abstract Repository getRepository(String uri)
-	    throws RemoteException, MalformedURLException, NotBoundException;
+            throws RemoteException, MalformedURLException, NotBoundException;
 }
 
 /**
@@ -216,8 +216,8 @@
     static String FactoryClassName = ClientRepositoryFactory.class.getName();
 
     public Repository getRepository(String uri)
-	    throws MalformedURLException, NotBoundException, RemoteException {
-	System.setProperty("java.rmi.server.useCodebaseOnly", "true");
-	return new ClientRepositoryFactory().getRepository(uri);
-   }
+            throws MalformedURLException, NotBoundException, RemoteException {
+        System.setProperty("java.rmi.server.useCodebaseOnly", "true");
+        return new ClientRepositoryFactory().getRepository(uri);
+    }
 }

Modified: incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java?rev=385460&r1=385459&r2=385460&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
(original)
+++ incubator/jackrabbit/trunk/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
Mon Mar 13 00:34:20 2006
@@ -175,7 +175,7 @@
         log.info("RepositoryStartupServlet initializing...");
         initRepository();
         try {
-            registerRMI();
+        registerRMI();
             registerJNDI();
         } catch (ServletException e) {
             // shutdown repository
@@ -366,15 +366,15 @@
             }
         } else {
             // convert RMI port configuration
-            if (rmiPortStr != null) {
-                try {
-                    rmiPort = Integer.parseInt(rmiPortStr);
-                } catch (NumberFormatException e) {
-                    log.warn("Invalid port in rmi-port param: " + e + ". using default port.");
+        if (rmiPortStr != null) {
+            try {
+                rmiPort = Integer.parseInt(rmiPortStr);
+            } catch (NumberFormatException e) {
+                log.warn("Invalid port in rmi-port param: " + e + ". using default port.");
                     rmiPort = Registry.REGISTRY_PORT;
-                }
             }
         }
+        }
 
         // check RMI port
         if (rmiPort == -1 || rmiPort == 0) {
@@ -462,7 +462,7 @@
                 } catch (RemoteException re) {
                     log.error("Cannot create the reference to the registry at "
                         + rmiHost + ":" + rmiPort, re);
-                }
+            }
             }
 
             // if we finally have a registry, register the repository with the
@@ -472,7 +472,7 @@
                     + " to registry " + reg);
                 reg.bind(rmiName, remote);
                 this.rmiURI = rmiURI;
-                log.info("Repository bound via RMI with name: " + rmiURI);
+            log.info("Repository bound via RMI with name: " + rmiURI);
             } else {
                 log.info("RMI registry missing, cannot bind repository via RMI");
             }
@@ -560,4 +560,4 @@
             throws RemoteException {
         return new ServerAdapterFactory().getRemoteRepository(repository);
     }
-}
\ No newline at end of file
+}



Mime
View raw message