2 Replies Latest reply on Feb 19, 2014 3:28 PM by Steven Hawkins

    How do setup Cassandra JNDI connection under Apache Tomcat?

    Ivan Chan Apprentice

      I found an example of setting uo Cassandra JNDI under JBoss:

       

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">

          <resource-adapters>

              <resource-adapter id="cassandra">

                  <module slot="main" id="org.jboss.teiid.resource-adapter.cassandra"/>

                  <transaction-support>NoTransaction</transaction-support>

                  <connection-definitions>

                      <connection-definition class-name="org.teiid.resource.adapter.cassandra.CassandraManagedConnectionFactory"

                              jndi-name="java:/cassandraDS"

                              enabled="true"

                              use-java-context="true"

                              pool-name="teiid-cassandra-ds">

                             

                            <!-- Cassandra host address -->

                            <config-property name="Address">some.host.com</config-property>

                           

                            <!-- Cassandra keyspace -->

                            <config-property name="Keyspace">keyspace</config-property>

                           

                      </connection-definition>

                  </connection-definitions>

              </resource-adapter>

          </resource-adapters>

      </subsystem>

       

      If I want to do the similar for Apache Tomcat, how should I define my <Resource>?

       

      Thanks a lot,

       

      - Ivan