Hi,
I am running 3 separate Catalyst (version '5.80022) apps that use a common
(Oracle 11g) database. Each app has a model class which wraps around a
common DBIC schema class, like so.
-----
package App1::Model::DB;
use strict;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
schema_class => Common::DB::Schema',
);
1;
-----
package App2::Model::DB;
use strict;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
schema_class => Common::DB::Schema',
);
1;
-----
package App3::Model::DB;
use strict;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
schema_class => Common::DB::Schema',
);
1;
-----
This setup passes changes to the Common::DB::Schema class on to the Catalyst
app model classes.
All three of these apps run under a single Apache 1.3.42/mod_perl 1.31
server. It appears that each server process creates a unique database
connection variable for each of these apps. Although these database
connections get reused from request to request, I would like to make things
even more efficient by having a single database connection variable per
server process which gets shared across all 3 Catalyst apps. How do I
update my model to accomplish this?
Thanks.
--
-- Simon
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/