Skip to content

Graceful shutdown of Cassandra Cluster object as part of CassandraAutoConfiguration #5063

Closed
@LtTempletonPeck

Description

@LtTempletonPeck

CassandraAutoConfiguration conditionally creates a com.datastax.driver.core.Cluster bean if it is missing from the BeanFactory.

To gracefully shutdown a Cassandra cluster the close method should be called as part of closing the application context, this is not currently being done.

Spring Data Cassandra classes CassandraCqlClusterFactoryBean and CassandraCqlSessionFactoryBean handle this by implementing the DisposableBean interface and calling close. Here we can just add it to the destroyMethod of the bean annotation for cluster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions