Author: gmazza
Date: Thu Jul 25 21:48:01 2013
New Revision: 1507141

URL: http://svn.apache.org/r1507141
Log:
Fixed the last of the three issues regarding JBoss deployment (email service 
not working consistently). Roller trunk works solidly on JBoss now.

Modified:
    
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
    roller/trunk/docs/roller-install-guide.odt

Modified: 
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
URL: 
http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java?rev=1507141&r1=1507140&r2=1507141&view=diff
==============================================================================
--- 
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
 (original)
+++ 
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
 Thu Jul 25 21:48:01 2013
@@ -73,12 +73,14 @@ public class MailProvider {
         
         // init and connect now so we fail early
         if (type == ConfigurationType.JNDI_NAME) {            
-            String name = "java:comp/env/" + jndiName;
+            if (jndiName != null && !jndiName.startsWith("java:")) {
+                jndiName = "java:comp/env/" + jndiName;
+            }
             try {
                 Context ctx = (Context) new InitialContext();
-                session = (Session) ctx.lookup(name);
+                session = (Session) ctx.lookup(jndiName);
             } catch (NamingException ex) {
-                throw new StartupException("ERROR looking up mail-session with 
JNDI name: " + name);
+                throw new StartupException("ERROR looking up mail-session with 
JNDI name: " + jndiName);
             }
         } else {
             Properties props = new Properties();

Modified: roller/trunk/docs/roller-install-guide.odt
URL: 
http://svn.apache.org/viewvc/roller/trunk/docs/roller-install-guide.odt?rev=1507141&r1=1507140&r2=1507141&view=diff
==============================================================================
Binary files - no diff available.


Reply via email to