Instantiate a DataStore (not open or created).
(String dataStoreClassName,
String storageUrl)
| 846 | |
| 847 | /** Instantiate a DataStore (not open or created). */ |
| 848 | protected static DataStore instantiateDataStore(String dataStoreClassName, |
| 849 | String storageUrl) throws PersistenceException { |
| 850 | DataStore godfreyTheDataStore = null; |
| 851 | try { |
| 852 | godfreyTheDataStore = |
| 853 | (DataStore)Gate.getClassLoader().loadClass(dataStoreClassName) |
| 854 | .newInstance(); |
| 855 | } catch(Exception e) { |
| 856 | throw new PersistenceException("Couldn't create DS class: " + e); |
| 857 | } |
| 858 | |
| 859 | godfreyTheDataStore.setStorageUrl(storageUrl); |
| 860 | |
| 861 | return godfreyTheDataStore; |
| 862 | } // instantiateDS(dataStoreClassName, storageURL) |
| 863 | |
| 864 | /** Add a listener */ |
| 865 | public static synchronized void addCreoleListener(CreoleListener l) { |
no test coverage detected