you would create a new session. Don't create a new cluster, that will
quickly exhaust the connections to the servers


On Fri, Mar 7, 2014 at 3:42 PM, Green, John M (HP Education) <
john.gr...@hp.com> wrote:

>  I've been tinkering with both the C++ and Java drivers but in neither
> case have I got a good indication of how threading and resource mgmt should
> be implemented in a long-lived multi-threaded application server
> process.    That is, what should be the scope of a builder, a cluster,
> session, and statement.   A JDBC connection is typically a per-thread
> affair.    When application server receives a request, it typically
>
> a)      gets JDBC connection from a connection pool,
>
> b)      processes the request
>
> c)       returns the connection to the JDBC connection pool.
>
>
>
> All the Cassandra driver sample code I've seen so far is for single
> threaded command-line applications so I'm wondering what is thread safe (if
> anything) and what objects are "expensive" to instantiate.   I'm assuming a
> Session is analogous to a JDBC connection so when a request comes into my
> multi-threaded application server, I should create a new Session (or find a
> way to pool Sessions), but should I be creating a new cluster first?   What
> about a builder?
>
>
>
> John "lost in the abyss"
>

Reply via email to