[Catalyst] Multiple DB, single instance of Cat

Nigel Stuckey nigel.stuckey at systemgarden.com
Fri Aug 15 11:05:03 BST 2008


Another question about multiple databases.

I have an existing application that uses a DBIx DB in the conventional  
way: as a model initialised at run time. All great so far...

However, I now need to make the application multi-organisation in the  
same instance of catalyst: users will select their organisation or  
repository when they login or it will be stored as a preference, etc.  
Due to the size of the repository, this is implemented as multiple  
databases. Thus a single running Catalyst instance will need to open  
several DBs sharing the same schema, dynamically after run time. Then  
it will have to close unused connections after a while.

What is the best way to do this with DBIx and where is the best place  
to store the handles/class references? A key to the active DB can be  
stored in the session.

Finally, Catalyst is a great framework and has been very reliable.  
Thanks to all involved!

cheers

Nigel




More information about the Catalyst mailing list