I am working on application which uses GWT
as front end and Hibernate 4.0
Framework. I am using SQL 2008 (R2). My application is purely DB Driven. And the application would get launch at multiple portals simultaneously with different DB. Right now, the problem which I am facing is, I have to deploy as many wars as many DBs are there for each Portal. Is there any way with Hibernate to make it configurable? Means After loading my Homepage after entering db name, db user_name and db password it gets connected to the DB.
I would also bring you notice that my Homepage gets loaded in JSP
. And after login it is calling GWT Entrypoint.
As said by @ToddMurray in the comments, you should use a configurable JNDI dataSource. It's the preferred way to go with containers like JBoss. See here for a config example.
Another way to go is with Hibernate properties: read the documentation here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With