When deploying an application using OGM with MongoDB onto WildFly, deployment fails in case the MongoDB server isn't started. Retrieval of the database in MongoDBDatastoreProvider should be done lazily to avoid this. This requires proper protection of the members as the provider is accessed concurrently.
|