Re: Sharing connection across forked processes
[prev]
[thread]
[next]
[Date index for 2004/12/22]
On Mon, 2004-12-20 at 10:55 -0500, Alexander Christian Westholm wrote:
> I assume I need to create the database handle myself per process,
> instead of allowing Ima::DBI to do the work... the docs are not
> terribly helpful on this matter: they make reference to writing my own
> db_Main method, but provide no example. Could someone illustrate this?
You're right, this should really be in the docs. Here's an example:
http://mathforum.org/epigone/modperl/teuthocrix/1098821949.2903.49.camel@xxxxxxxxx.xxxxxxxxxxx
I'm doing some tricks in there for better performance with mod_perl, but
you can skip those. Just make sure you do the $db_options stuff.
> Also, assuming I go that route, will CDBI itself use the db_Main
> method to generate its connections
Yes.
> will it simply be a method that I'll call to get a connection outside
> of Ima::DBI's cache?
You can call it directly if you need access to the database handle.
Otherwise, you will never need to touch it.
- Perrin
|
|
Re: Sharing connection across forked processes
Perrin Harkins 18:30 on 22 Dec 2004
|