Dear Tomcat users,
I am not familiar with Tomcat or the Java world in general so I have a
rather simple question.
Part of my job is to maintain and evolve a Java web application based on
JBPM which as such use a (MySQL) DB. This application is independently
deployed on a handful Tomcat servers (each instance uses a different
DB). We use a very old version of Tomcat (5.5.17) but I don't think that
this is related to my question.
We use maven to create the WAR file. Right now we have to create one WAR
file per server based on different maven profiles (i.e. running `mvn
-Pserver1 ...' then `mvn -Pserver2 ...', etc.). Those profiles contains
the MySQL DB to use (and other configuration) which is used to configure
Hibernate (and other libraries) at compile time for this server.
As you can imagine, there are several problems with this approach: it is
impossible to deploy without the source code and maven, the
configuration of each deployment has to be in the code, etc.
I have read a bit about Tomcat and if I understand correctly, the
correct way to do is to declare a Resource in the configuration of each
server which represents the DB to use and then adapt the code (in
particular Hibernate configuration) to use this Resource based on it's
name. Then the same WAR file can be deployed on any servers provided
it's configured without maven (i.e. I just have to upload the WAR file
and voilà).
Is that correct ?
Thanks in advance,
Mathieu Dubois
--
Mathieu Dubois - IR - UMR 8030 équipe LABGeM
CEA - Genoscope. 2 rue Gaston Crémieux. 91057 Evry Cedex France.
Bureau B07
+33 1 60 87 53 35
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org