Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow application to start if cassandra is unavailable [DATACASS-210] #380

Closed
spring-projects-issues opened this issue Apr 27, 2015 · 1 comment
Assignees
Labels
type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Chad Jaros opened DATACASS-210 and commented

If cassandra is not available at boot time, CassandraCqlSessionFactoryBean.afterPropertiesSet() causes the application to exit before completing the startup process. It is desirable for my application to complete booting and allow the application to start and report specific errors.

This can be accomplished by making the factory beans operate lazily, retrying the connection on demand and storing the session object once a connection is successfully made


Affects: 1.2 GA (Fowler)

Issue Links:

  • DATACASS-460 NoHostAvailable not caught at bean declaration, but only at initialization
    ("is duplicated by")

1 votes, 1 watchers

@spring-projects-issues spring-projects-issues added the type: task A general task label Dec 31, 2020
@christophstrobl christophstrobl self-assigned this Mar 13, 2024
@christophstrobl christophstrobl added type: enhancement A general enhancement and removed type: task A general task labels Mar 13, 2024
@christophstrobl
Copy link
Member

With Spring Boot being the main entry point for configuration of the SessionFactoryFactoryBean via the CassandraDataAutoConfiguration we should provide means avoid eager initialization of a provided CqlSession bean.
Introducing Supplier based alternatives and switching to lazy evaluation would allow the context to start without actually establishing a connection as long as no schema actions need to be performed.

mp911de added a commit that referenced this issue Mar 18, 2024
Reformat code. Lazily obtain the keyspace name from CqlSession in SimpleUserTypeResolver.

See #380
Original pull request: #1485
@mp911de mp911de added this to the 4.3 RC1 (2024.0.0) milestone Mar 18, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants