3

Let's take a java ee application in production, which uses prepared statements. Let's assume that it prepared required statements on initialization of its session beans.

In cassandra, each prepared statement has an id. If now, if cassandra is restarted, will java ee application also needs to get restarted?

pinkpanther
  • 4,770
  • 2
  • 38
  • 62

1 Answers1

4

Almost all Cassandra clients should support this situation without having to restart (all datastax drivers do to my knowledge). For example, in the java-driver, when a node goes down and comes up again, one of the first things it does when marking it as available is reprepare all PreparedStatements your application has registered.

In addition, if you make a query using a PreparedStatement in your application and a Cassandra node responds that it does not know about that statement, the client should prepare that query and retry the request.

Andy Tolbert
  • 11,418
  • 1
  • 30
  • 45