Hi Maciej,
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):
Code:
...
<system-properties>
<property name="MONGODB_HOST" value="ADDRESS_OF_MY_HOST"/>
</system-properties>
...
* In your persistence.xml, refer to these properties like this:
Code:
...
<properties>
<property name="hibernate.ogm.datastore.host" value="${MONGODB_HOST}" />
</properties>
...
Hibernate will then pull the value for this property from the system property configured in the environment.
Hope this gets you going. Let me know in case you run into any issues.
Quote:
I am using WildFly 8.1 and Hibernate OGM 4.1.0.Beta1 with custom datastore supporting Riak database.
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.
--Gunnar