Hi, We've developed our own application session server functionality, (with our own proprietry data access layer) to process user requests; and based on their user details, direct the request to that users appropriate database to either retrieve or update data. We've hundreds of clients, therefore hundreds of databases, 1 per customer (MS SQL Server). All requests are driven by the 1 application server - which comprises the web server (JRUN) and a session server - our own implementation.
We're now about to start evaluating other application servers on the market. eg. JBoss etc, with a view to use CMP or Hibernate. My problem is how could we configure or manage multiple databases with these application servers. For example, would JBoss know how to differentiate between a 'client' object with a primary key of '1' from one database and the same 'client' object type from a different database with a primary key of '1'? How would any application server handle this?
The option to incorporate all databases into one 'mother of all databases' is not an option.
I know with hibernate you could have several configurations, either in a file or in code, and have any number of configurations loaded at any one time. Assuming you go the file route you would basically need a file per DB, although I imagine you could automate the configuration file generation.
I'm guessing the tables in each database are the same so the only difference would be the db/alias name.
A possibly easier option might be to have the configuration in code, but pass in a parameter for the db name when you build it. That would eliminate the duplicate configurations. Then you would lose the ability to change configuration without a new build (it could be done, but would be harder), but that doesn't sound like it would be a problem.
Joined: May 24, 2005
Thanks for getting back to me.
Anybody have any further idea's especially related to CMP. How does the Application server differientiate between the same object type from one DB and the same object from another DB - where both objects share the same primary key value.