Search in sources :

Example 1 with LocalDocumentStore

use of org.gluu.service.document.store.LocalDocumentStore in project oxCore by GluuFederation.

the class DocumentStoreProviderFactory method getLocalDocumentStoreProvider.

@Produces
@ApplicationScoped
@LocalDocumentStore
public DocumentStoreProvider getLocalDocumentStoreProvider() {
    log.debug("Started to create local document store provider");
    DocumentStoreType documentStoreType = DocumentStoreType.LOCAL;
    DocumentStoreProvider documentStoreProvider = instance.select(LocalDocumentStoreProvider.class).get();
    if (documentStoreProvider == null) {
        throw new RuntimeException("Failed to initialize DocumentStoreProvider, DocumentStoreProviderType is unsupported: " + documentStoreType);
    }
    documentStoreProvider.create();
    return documentStoreProvider;
}
Also used : DocumentStoreType(org.gluu.service.document.store.conf.DocumentStoreType) LocalDocumentStore(org.gluu.service.document.store.LocalDocumentStore) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Aggregations

ApplicationScoped (javax.enterprise.context.ApplicationScoped)1 Produces (javax.enterprise.inject.Produces)1 LocalDocumentStore (org.gluu.service.document.store.LocalDocumentStore)1 DocumentStoreType (org.gluu.service.document.store.conf.DocumentStoreType)1