But having a configuration value for persistence.xml would surely would be a good thing as well.
When it comes to configuration values, could you not just comma separate hosts and ports in hibernate.ogm.datastore.host resp. hibernate.ogm.datastore.port. This is also how the driver url looks like - see this test. In our case we have two properties, but I think one could just say, if there is a single host, but multiple ports, assume all instances are on the same host. Similar for multiple hosts. If there are multiple hosts and ports there must be a match in argument length.
Also, being able to specify a replica set is one thing, but I guess you also need to then be able to configure some of the different read/write semantics - http://docs.mongodb.org/ecosystem/drivers/java-replica-set-semantics/, or not?
|