Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Frontend for Hibernate and SQL 2008 Connection through JSP or JS

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.

like image 412
PVR Avatar asked Nov 12 '22 14:11

PVR


1 Answers

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.

like image 155
Vincent Avatar answered Nov 15 '22 07:11

Vincent