Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

webapplication with several databases

 
Michael Krotky
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Java-Ranch-Folks,
I hava a running webapplication with tomcat6. It consists of several tables in one database which is defined as a JDBC Data Source. The application is a content management system where you can create new workflows (tables), upload data together with text comments in the individual cells of the tables. All workflows are project related. Now in our company a new project begins and I want to use a new database for that. So my question. What is the recommended way of enabling a non-admin-person to create a new project with a jsp GUI. Is it possible to configure/add JDBC Data Sources via java code? Also for the new project their might be different users/roles. Here the same problem. I would have to define a Realm via java code when the user creates a new project. I was doing a google-search and going through my tomcat books again but couldn't find something useful. Thanks in advance.

javaskater
 
Scott Selikoff
author
Saloon Keeper
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally you don't configure databases on the fly in a web application since most database changes require restarts. What you can do is setup a list of available databases, and the program can switch to them for different processes.

Its why its helpful to setup databases on the server level (not in the application) as pools. Most J2EE servers have a method for adding/removing connections on this level.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally you don't configure databases on the fly in a web application since most database changes require restarts. What you can do is setup a list of available databases, and the program can switch to them for different processes.

Its why its helpful to setup databases on the server level (not in the application) as pools. Most J2EE servers have a method for adding/removing connections on this level.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic