From jim.barrows at gmail.com Sat Mar 16 01:32:16 2013 From: jim.barrows at gmail.com (Jim Barrows) Date: Fri, 15 Mar 2013 18:32:16 -0700 Subject: [postmodern-devel] A question about connection pooling, and the many ways to connect. Message-ID: I'm a java developer, and I think I'm expecting something to happen that's not. In Java I setup a pooled connection, and just use it. The connections pool themselves. I had thought that by doing: (setf *database* (connect "PomBanDone" "pombandone" "pombandone" "localhost" :pooled-p T))) that I would get connection pooling. However now that I'm getting a better understanding of Lisp and I think Postmodern, that connections aren't getting pooled. I think I have to use (with-connection (spec &body body) in order to make the connection pooling work. Is that the case? If not, why would I want to use with-connection? Thanks! -- James A Barrows -------------- next part -------------- An HTML attachment was scrubbed... URL: From marijnh at gmail.com Sat Mar 16 21:24:28 2013 From: marijnh at gmail.com (Marijn Haverbeke) Date: Sat, 16 Mar 2013 22:24:28 +0100 Subject: [postmodern-devel] A question about connection pooling, and the many ways to connect. In-Reply-To: References: Message-ID: Hi Jim, You're right, you have to use local connection and specify that you want them to be pooled. (This model has much less overhead -- a single synchronization point -- than a model where a single handle can be used in a multi-threaded way.) Best, Marijn On Sat, Mar 16, 2013 at 2:32 AM, Jim Barrows wrote: > I'm a java developer, and I think I'm expecting something to happen that's > not. In Java I setup a pooled connection, and just use it. The connections > pool themselves. > > I had thought that by doing: > (setf *database* (connect "PomBanDone" "pombandone" "pombandone" "localhost" > :pooled-p T))) > that I would get connection pooling. > > However now that I'm getting a better understanding of Lisp and I think > Postmodern, that connections aren't getting pooled. I think I have to use > (with-connection (spec &body body) in order to make the connection pooling > work. > > Is that the case? If not, why would I want to use with-connection? > > Thanks! > -- > James A Barrows > > _______________________________________________ > postmodern-devel mailing list > postmodern-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel >