Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

10/23/2020

Reading time:N/A min

DataStax-Examples/switch-connection-java

by DataStax-Examples

This application shows how to use both the latest version 4.x and the legacy version 3.x of the Java DataStax Driver to connect to an on-prem Cassandra database or a Apollo database in the cloud at runtime using environment variables.Contributor(s): Dave BechbergerObjectivesShows the differences between a Cassandra connection configuration and an Apollo connection configuration in a single app.Provide a demonstration of how to configure the database connection at runtime.See the documentation for more details about the Apollo connection configuration for the Java Driver ( 4.x docs | 3.x docs ).Project Layoutv3 - The application that shows how to accomplish this task with the legacy version 3.x of the Java DataStax Driverv4 - The application that shows how to accomplish this task with the latest version 4.x of the Java DataStax DriverHow this WorksRefer to the READMEs in the appropriate sub folder above to see the details of how to accomplish this with your desired java driver version.

Illustration Image

This application shows how to use both the latest version 4.x and the legacy version 3.x of the Java DataStax Driver to connect to an on-prem Cassandra database or a Apollo database in the cloud at runtime using environment variables.

Contributor(s): Dave Bechberger

Objectives

  • Shows the differences between a Cassandra connection configuration and an Apollo connection configuration in a single app.
  • Provide a demonstration of how to configure the database connection at runtime.
  • See the documentation for more details about the Apollo connection configuration for the Java Driver ( 4.x docs | 3.x docs ).

Project Layout

  • v3 - The application that shows how to accomplish this task with the legacy version 3.x of the Java DataStax Driver
  • v4 - The application that shows how to accomplish this task with the latest version 4.x of the Java DataStax Driver

How this Works

Refer to the READMEs in the appropriate sub folder above to see the details of how to accomplish this with your desired java driver version.

Related Articles

spring
rest
api

GitHub - DataStax-Examples/spring-data-starter: ⚡️ A sample Spring Data Cassandra REST API

John Doe

2/14/2024

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

java