Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Updated spring context file to reflect changes done in .17
Browse files Browse the repository at this point in the history
  • Loading branch information
hadolphs committed Nov 18, 2010
1 parent d34c07f commit a7a366b
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions src/test/resources/cassandra-context-test-v2.xml
Expand Up @@ -10,20 +10,51 @@
<constructor-arg value="localhost:9170"/>
</bean>

<bean id="cluster" class="me.prettyprint.cassandra.service.Cluster">
<bean id="cluster" class="me.prettyprint.cassandra.service.ThriftCluster">
<constructor-arg value="TestCluster"/>
<constructor-arg ref="cassandraHostConfigurator"/>
</bean>

<bean id="keyspaceOperator" class="me.prettyprint.cassandra.model.HFactory" factory-method="createKeyspaceOperator">
<bean id="keyspace" class="me.prettyprint.hector.api.factory.HFactory" factory-method="createKeyspace">
<constructor-arg value="Keyspace1"/>
<constructor-arg ref="cluster"/>
</bean>

<bean id="simpleCassandraDao" class="me.prettyprint.cassandra.dao.SimpleCassandraDao">
<property name="keyspaceOperator" ref="keyspaceOperator"/>
<property name="keyspaceName" value="Keyspace1"/>
<property name="keyspace" ref="keyspace"/>
<property name="columnFamilyName" value="Standard1"/>
</bean>

<!-- Using a pool factory example -->
<!--
<bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator">
<constructor-arg value="${cassandra.client.pool}" />
<property name="maxActive" value="${cassandra.client.hosts.maxActive}" />
<property name="maxIdle" value="${cassandra.client.hosts.maxIdle}" />
<property name="maxWaitTimeWhenExhausted" value="${cassandra.client.hosts.maxWaitTimeWhenExhausted}" />
</bean>
<bean id="cassandraClientPoolFactory" class="me.prettyprint.cassandra.service.CassandraClientPoolFactory" factory-method="getInstance" />
<bean id="cassandraClientPool" factory-bean="cassandraClientPoolFactory" factory-method="createNew">
<constructor-arg>
<ref bean="cassandraHostConfigurator" />
</constructor-arg>
</bean>
<bean id="cluster" class="me.prettyprint.cassandra.service.ThriftCluster">
<constructor-arg value="${cassandra.clusterName}" />
<constructor-arg ref="cassandraClientPool" />
</bean>
<bean id="keyspace" class="me.prettyprint.hector.api.factory.HFactory" factory-method="createKeyspace">
<constructor-arg value="${cassandra.keyspace}" />
<constructor-arg ref="cluster" />
</bean>
<bean id="simpleCassandraDao" class="me.prettyprint.cassandra.dao.SimpleCassandraDao">
<property name="keyspace" ref="keyspace" />
<property name="columnFamilyName" value="MyColumnFamily" />
</bean>
-->
</beans>

0 comments on commit a7a366b

Please sign in to comment.