I asked this in one of the newbie general forums, but I think it might be better asked where the experts live.
I need a nudge or a shove in the right direction. I'm a
Java newbie and need some architecture advice on working with multiple db's in a
servlet or
J2EE situation. I'd like to be able ton narrow my vision/world a little and prevent getting overwhelmed with Java. I'm not a stranger to programming....just new to Java.
My challenge in a Nutshell.
I have a commercial product that uses Oracle. This product has one database for 'Site Administration' and any number of 'project' db's (all with the same 'project' schema). The 'Site Administration' db stores in one of it's tables the location and connection
string information required to locate and connect to the 'Project' db's. The number (currently around 80) and location of the 'Project' db's can and does change during the day, week, month etc. The product allows users to create and remove db's at runtime.
I want to create an application that reports from the 'project' db's. I have some
JSP reports going along with JFreeCharts already. At this point I'm trying to understand the *best* approach for dynamic runtime datasources. As I see this through my newbies eyes I'm not sure how to define or register or whatever the required datasources with the container because I will never know for certain what db's are present. I will not be able to define these before deployment.
Can someone help point me in the right direction? Can a person register JNDI stuff at runtime? How best to ensure I have connection pooling etc with runtime datasources?
My end target should be full enterprise stability/scalability so I want to make sure I archiect the
JDBC stuff correctly before I build out the rest of the application.
I'm currently using
Tomcat, but can move to
Jboss or WebSphere when deployed in production. I do not yet have experience with either Jboss or Webphere (still keeping my world small to make learing Java easier).
Can anyone give me a shove in the right direction?
thanks!