Re: Singleton database connection

2015-06-18 Thread Javier Gonzalez
through the builder, as you have noticed. >>> You can use a lazy initialized singleton or some sort of connection pool. >>> On Jun 17, 2015 5:05 PM, "Kushan Maskey" < >>> kushan.mas...@mmillerassociates.com> wrote: >>> >>>> I am wondering

Re: Singleton database connection

2015-06-18 Thread Kushan Maskey
on through the builder, as you have noticed. >> You can use a lazy initialized singleton or some sort of connection pool. >> On Jun 17, 2015 5:05 PM, "Kushan Maskey" < >> kushan.mas...@mmillerassociates.com> wrote: >> >>> I am wondering how can

Re: Singleton database connection

2015-06-18 Thread Javier Gonzalez
sociates.com> wrote: > >> I am wondering how can I safely create a Singleton database connection >> and use it through out the process. >> >> Here is my scenario. >> >> I got bunch of bolts that updates Cassandra database. I have reader and >> writer classe

Re: Singleton database connection

2015-06-17 Thread Nathan Leung
You cannot pass a connection through the builder, as you have noticed. You can use a lazy initialized singleton or some sort of connection pool. On Jun 17, 2015 5:05 PM, "Kushan Maskey" < kushan.mas...@mmillerassociates.com> wrote: > I am wondering how can I safely create a

Singleton database connection

2015-06-17 Thread Kushan Maskey
I am wondering how can I safely create a Singleton database connection and use it through out the process. Here is my scenario. I got bunch of bolts that updates Cassandra database. I have reader and writer classes where each needs a database session to execute queries. We create session on each