This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

webapplication with several databases  RSS feed

 
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
 
author
Posts: 4099
21
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
Posts: 4099
21
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!