Is it possible to customize hibernate ogm datastore in such a way to use datasource properties from application server (the same way it's usually done with mysql connectors)?I have a scenario where deployed war application should inherit settings from existing environment - rather than use these embedded in persistence.xml: hibernate.ogm.datastore.host and hibernate.ogm.datastore.port.

I did some experiments on WildFly - added some properties to datasource (java:jboss/datasources/ExampleDS) but Hibernate OGM is ignoring them. According to documentation it's expected behavior..."In your persistence.xml, you also need to define an existing datasource. It is not needed by Hibernate OGM and won’t be used but the JPA specification mandates this setting."

Could you please give me some hints where/what should I look for in order to implement such functionality - if it's not available out of box already?

Right now there is no equivalent to datasources for NoSQL stores in WildFly.

For the time being, you can try the following to separate the configuration of credentials from your deployment unit:

* Create system properties for the required settings, e.g. by adding the following to your standalone.xml (see http://www.mastertheboss.com/jboss-configuration/how-to-inject-system-properties-into-jboss for some background information):

That's very interesting. So you have created your custom GridDialect for Riak? Would you be interested in contributing it as a module to the OGM project? Btw. I also can recommend to upgrade to the latest Beta, there have been done many improvements since Beta1.

So you have created your custom GridDialect for Riak? Would you be interested in contributing it as a module to the OGM project? Btw. I also can recommend to upgrade to the latest Beta, there have been done many improvements since Beta1.

Yes, I actually thought about it.GridDialect which I've implemented supports Riak 1.4.x right now. There are still some missing features like native queries or id generation support. I skipped them because there are some known issues with Riak 1.4.x itself. Recently however Riak 2.0 has been released which comes with new interesting concepts and significant improvements of existing mechanisms, e.g. full text search. Next month probably I will try to find some time give support for it too.