Hi all,
I have a requirement in which I should be able to connect to multiple databases dynamically using Hibernate.
I can use multiple configuration files and call configure(String filename) to create SessionFactory object. But my requirement is that multiple databases get connected dynamically which I am unaware of, so I would not be able to configure them in prior using separate config files.
I would like to explain the architecture we have-
There is a GUI, a controller and a model. This model could be a distributed one, ie., there can be no. of datasources running in multiple servers.
For the connectivity between the controller and the model, we are using Hibernate. And these datasources are connected dynamically to the controller at run-time. Hence we do not know the connectivity parameters beforehand. So, how to resolve this?
Thanks,
Deepa
|