roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r984600 - /roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java
Date Wed, 11 Aug 2010 21:57:19 GMT
Author: snoopdave
Date: Wed Aug 11 21:57:18 2010
New Revision: 984600

URL: http://svn.apache.org/viewvc?rev=984600&view=rev
Log:
Fix for https://issues.apache.org/jira/browse/ROL-1741

Don't attempt to build JNDI name if one is already specified. Check for presence of ":" to
determine if full name already specified.

Modified:
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java?rev=984600&r1=984599&r2=984600&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java
Wed Aug 11 21:57:18 2010
@@ -121,7 +121,7 @@ public class DatabaseProvider  {
             
         // Else attempt to locate JNDI datasource
         } else { 
-            String name = "java:comp/env/" + getJndiName();
+            String name = (getJndiName().indexOf(":") == -1 ? "java:comp/env/" + getJndiName()
: getJndiName());
             successMessage("-- Using JNDI datasource name: " + name);
             try {
                 InitialContext ic = new InitialContext();



Mime
View raw message