• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

CHANGE HIBERNATE PROPERTIES ON THE FLY

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. The application is kind of BI ( Business Intelligence ) tool developed on struts spring and hibernate .
2. System will automate the report generation process , i.e kind of query builder ..Which will connect to the data base and user can generate query using user interface ( i.e selecting table/view and select display columns and apply where clause conditions , apply group by and order by condition , output type(pdf/html ) )
and output will be generated based on above conditions
3. This is designed for MySQL data base
4. Earlier the db connection properties are configured in the hibernate.cfg.xml file
5. Now the requirement is Client wants to turn this to dynamic ..i.e In the very first screen user should provide the connection details through screen ...( Server , user name , password ,database )..
6. System should connect the DB based on the properties through application ...Then user generates the queries and generate reports .....

There is one db connection is possible for single deployment ( i.e user can not have more than one db connections , only one is allowed )


But how to change the session object based on user in puts ..
in my case DB is MySQL , User provides following details
1. DB Name
2. Server Location
3. User Name
4. Password


SUGGESTIONS AND SOLUTIONS ARE PLEASE REQUESTED.
THANK YOU
VARSHA
 
Bartender
Posts: 9560
12
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the Hibernate documentation, section 1.1.1.1, Programmatic Configuration
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!