0

How can i set the Consistency level to quorum using Kundera Cassandra using external config files ? we can do that wihthout external config files using:- Map propertyMap = new HashMap(); propertyMap.put(CassandraConstants.CQL_VERSION, CassandraConstants.CQL_VERSION_3_0); propertyMap.put("consistency.level",ConsistencyLevel.QUORUM);

but i want to use external configuration file.

Gargee Banerjee
  • 215
  • 1
  • 3
  • 9
  • well i found the solution to this :- we can set the consistency level Using JPA we can set additional properties within @PersistenceContext annotation: @PersistenceContext(type = PersistenceContextType.EXTENDED, properties = { @PersistenceProperty(name = "consistency.level", value="QUORUM") }) – Gargee Banerjee Jul 26 '13 at 20:26

1 Answers1

1

The solution to the problem consists in setting the consistency level using the Java Persistence API (JPA).

It is possible to set additional properties within @PersistenceContext annotation:

 @PersistenceContext(type = PersistenceContextType.EXTENDED, properties = { @PersistenceProperty(name = "consistency.level", value="QUORUM") }) 
Paulo Tomé
  • 1,910
  • 3
  • 18
  • 27
Gargee Banerjee
  • 215
  • 1
  • 3
  • 9