jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r613898 - /jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
Date Mon, 21 Jan 2008 14:21:50 GMT
Author: thomasm
Date: Mon Jan 21 06:21:49 2008
New Revision: 613898

URL: http://svn.apache.org/viewvc?rev=613898&view=rev
Log:
JCR-1305 JNDI data sources with BundleDbPersistenceManager: UnsupportedOperationException

Modified:
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java?rev=613898&r1=613897&r2=613898&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
Mon Jan 21 06:21:49 2008
@@ -57,7 +57,11 @@
                     // JNDI context
                     Context context = (Context) d.newInstance();
                     DataSource ds = (DataSource) context.lookup(url);
-                    return ds.getConnection(user, password);
+                    if (user == null && password == null) {
+                        return ds.getConnection();
+                    } else {
+                        return ds.getConnection(user, password);
+                    }
                 } else {
                     try {
                         // Workaround for Apache Derby:



Mime
View raw message