Markus Schönhaber wrote:
André Warnier wrote:
edponce wrote:
depending on the needs of the problem. I need to have 2 instances of
tomcat
on the same server for the same application. One would be for
production and
the other for development (which can be start and stopped whenever
without
affecting the production one).
You do not necessarily need two separate instances of Tomcat.
Under Tomcat, each application can be started and stopped (and even a
new version reloaded) without stopping the Tomcat server.
You would just need to "name" your applications differently.
(like "http://host.mycompany.com/real-app" and
"http://host.mycompany.com/test-app").
Yes, that's possible.
There also exists the possibility to run one Tomcat with different
"Virtual Hosts", on the same port 80.
Each one of these virtual hosts would have a different "DNS name"
(like "realserver.mycompany.com" and "testserver.mycompany.com") and
could have a different directory where the applications reside, but
the application itself would be named the same way.
Yes, that's also possible.
I am mentioning the above two possibilities because, you knowing not
much about Tomcat to start witj, either one of the above is probably
easier to set up than two separate Tomcat instances.
I don't see what's difficult with creating two separate Tomcats. Just
unpack the Tomcat archive two times to different directories[1] and
change the ports used in one of them so that they are unique. Looking at
the default server.xml, there are three numbers to be changed (YMMV if
you add/remove Connectors).
The difference between the above solutions and two really separate
Tomcat instances would be if the test application could really crash
the whole server, in which case you may not like one of the above
solutions.
Exactly.
Furthermore, if I understand the OP's statement above correctly, he
wants to be able to restart the development Tomcat without affecting the
production Tomcat. That's not possible with either of those two solutions.
True. But I was wondering why he said that he needed to restart Tomcat.
Considering that he mentioned he knows not much about it, the OP may
be unaware that it is not necessary to restart Tomcat, if the reason is
just to re-install/re-start a new version of the test application.
To the OP : at least until Tomcat version 5.5, there is an integrated
web-accessible "Manager" application, through which you can start and
stop any application, and upload a new version and restart it. All this
through a web form, and without restarting Tomcat.
Comments anyone ?
No matter which possibilities exist to set up multiple Tomcat instances
on a single machine, I would *never* use a production server for
development. If I was in the OP's shoes, I'd rethink this requirement
(if it indeed is one).
Me too.
To the OP : it would really be more secure and stable to use two
different servers, on which you could install two exactly identical
Tomcat's. A test Tomcat does not necessarily need a big server, and
your average clunky PC running Linux would probably do fine.
(It does need some RAM though).
That would be a lot easier to install, because you could have on each
just a Tomcat out-of-the-box.
(Also, whether you run Tomcat under Linux or Windows, from a pure-Java
application point of view it is much the same.)
Regards
mks
[1] Of course, one can create multiple Tomcat instances from a single
binary by using multiple different CATALINA_BASEs. But that might be
unnecessary complex in this case.
Now, edponce, after reading the above and thinking about it, where do
you incline ?
And please, tell us some more about your exact environment if you can.
Like, what is the server, what is the Tomcat version, where do you get
it from, how do you install it, etc..
That would help us a lot to narrow down the possibilities.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]