[postmodern-devel] A question about connection pooling, and the many ways to connect.

Marijn Haverbeke marijnh at gmail.com
Sat Mar 16 21:24:28 UTC 2013


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 <jim.barrows at gmail.com> 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
>





More information about the postmodern-devel mailing list