Create a new DataStore and open it. NOTE: for some data stores creation is an system administrator task; in such cases this method will throw an UnsupportedOperationException.
(String dataStoreClassName,
String storageUrl)
| 832 | * method will throw an UnsupportedOperationException. |
| 833 | */ |
| 834 | public static DataStore createDataStore(String dataStoreClassName, |
| 835 | String storageUrl) throws PersistenceException, |
| 836 | UnsupportedOperationException { |
| 837 | DataStore ds = instantiateDataStore(dataStoreClassName, storageUrl); |
| 838 | ds.create(); |
| 839 | ds.open(); |
| 840 | if(Gate.getDataStoreRegister().add(ds)) |
| 841 | creoleProxy.fireDatastoreCreated(new CreoleEvent(ds, |
| 842 | CreoleEvent.DATASTORE_CREATED)); |
| 843 | |
| 844 | return ds; |
| 845 | } // createDataStore() |
| 846 | |
| 847 | /** Instantiate a DataStore (not open or created). */ |
| 848 | protected static DataStore instantiateDataStore(String dataStoreClassName, |