gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject gora git commit: GORA-293 getDatastore use Class.forName() when use String parameters for dataStoreClass
Date Fri, 08 Jan 2016 23:26:18 GMT
Repository: gora
Updated Branches:
  refs/heads/master 15e659d5b -> e707ca6f5


GORA-293 getDatastore use Class.forName() when use String parameters for dataStoreClass


Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/e707ca6f
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/e707ca6f
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/e707ca6f

Branch: refs/heads/master
Commit: e707ca6f5aca8ef8531b22acf5f2a2bcc8aa605c
Parents: 15e659d
Author: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov>
Authored: Fri Jan 8 15:29:15 2016 -0800
Committer: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov>
Committed: Fri Jan 8 15:29:15 2016 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/gora/store/DataStoreFactory.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/e707ca6f/gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java b/gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java
index e11327a..8d2c441 100644
--- a/gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java
+++ b/gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java
@@ -219,7 +219,7 @@ public class DataStoreFactory{
           throws GoraException {
     try {
       Class<? extends DataStore<K,T>> c
-          = (Class<? extends DataStore<K, T>>) Class.forName(dataStoreClass);
+          = (Class<? extends DataStore<K, T>>) ClassLoadingUtils.loadClass(dataStoreClass);
       return createDataStore(c, keyClass, persistentClass, conf, createProps(), null);
     } catch(GoraException ex) {
       throw ex;
@@ -259,6 +259,9 @@ public class DataStoreFactory{
   /**
    * Instantiate <i>the default</i> {@link DataStore}. Uses default properties.
Uses 'null' schema.
    * 
+   * Note:
+   *    consider that default dataStore is always visible
+   *
    * @param keyClass The key class.
    * @param persistent The value class.
    * @param conf {@link Configuration} to be used be the store.


Mime
View raw message