How is GlorpOpenDBXDriverPoolingDriver supposed to work?

4 views
Skip to first unread message

Mariano Martinez Peck

unread,
Jul 9, 2013, 10:50:51 AM7/9/13
to Pharo Development List, dbx...@googlegroups.com
Hi guys,

There is something I don't understand. The idea with GlorpOpenDBXDriverPoolingDriver is that it takes care of opening the connections and have a pool, right?

Now...I am at the glorp side...each time I want to do something I instantiate a GlorpSession. Of course, I don't want to send #login to this session because that's what the pool would do if necessary. So say I just send a query with the session. I get a DNU because 'databaseDriver' is nil. As you can see, databaseDriver is set in PharoDatabaseAccessor >> loginIfError:.
of course, if I send #login or #loginIfError before doing the query the pool "works"...but...I am opening a connection for each query.

So I don't understand how this is supposed to work. How should I manage my Glorp sessions with this pool?

Mariano Martinez Peck

unread,
Jul 9, 2013, 11:12:08 AM7/9/13
to Pharo Development List, dbx...@googlegroups.com
Ahhh ok...I think I got it. The magic is in  SelmaConnectionPool >> #connect:
Reply all
Reply to author
Forward
0 new messages