You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2007/06/14 19:47:55 UTC

svn commit: r547332 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MailProvider.java

Author: agilliland
Date: Thu Jun 14 10:47:55 2007
New Revision: 547332

URL: http://svn.apache.org/viewvc?view=rev&rev=547332
Log:
some fixes for MailProvider, most notably that the jndi propery name is mail.jndi.name and not mail.jndiName.


Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MailProvider.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MailProvider.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MailProvider.java?view=diff&rev=547332&r1=547331&r2=547332
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MailProvider.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MailProvider.java Thu Jun 14 10:47:55 2007
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
 package org.apache.roller.weblogger.business;
 
 import java.util.Properties;
@@ -13,11 +31,14 @@
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.config.RollerConfig;
 
+
 /**
  * Encapsulates Roller mail configuration, returns mail sessions.
  */
 public class MailProvider {
-    private static Log log = LogFactory.getLog(MailProvider.class);
+    
+    private static final Log log = LogFactory.getLog(MailProvider.class);
+    
     private enum ConfigurationType {JNDI_NAME, MAIL_PROPERTIES; }
     
     private static MailProvider singletonInstance = null;
@@ -39,14 +60,14 @@
         if ("properties".equals(connectionTypeString)) {
             type = ConfigurationType.MAIL_PROPERTIES;
         }
-        jndiName =     RollerConfig.getProperty("mail.jndiName");
+        jndiName =     RollerConfig.getProperty("mail.jndi.name");
         mailHostname = RollerConfig.getProperty("mail.hostname");
         mailUsername = RollerConfig.getProperty("mail.username");
         mailPassword = RollerConfig.getProperty("mail.password");
         try {
             mailPort = Integer.parseInt(RollerConfig.getProperty("mail.port"));
         } catch (Throwable t) {
-            log.error("ERROR mail server port not a valid integer, ignoring");
+            log.warn("mail server port not a valid integer, ignoring");
         }
         
         // init and connect now so we fail early