facebook

Multiple tomcat5 installations

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #238251 Reply

    dream_walker
    Member

    This message has not been recovered.

    #238276 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #238352 Reply

    dream_walker
    Member

    Context: I develop two apps, one during the working hours and one for myself (evening). Both of them are to run under tomcat5. And I don’t want each evening to execute an Undeploy for ProjWork and enable the deploy ProjExtra, and in the morning do it reverse (enable deploy for ProjWork and disable ProjExtra).

    Problem: Now I dev for ProjWork. I start the server, open the browser and start to browse my webapp. In eclipse, I realize that I have some code problems (aka bugs), and I make the changes. Sometimes, when I make some big changes (static fields, initialization) the hotcode redeployment fails and then I have to stop tomcat. Or if I change some constants in the MultiLanguage files (Struts), I have to stop tomcat so that it reloads the data…
    … and then I have to start tomcat… which again loads the ProjWork and also ProjExtra. :((

    There could be several solutions for this problem:
    1) Allow to register several servers (e.g. more than one instance of Tomcat5).
    2) Develop a mechanism to allow me to define a configuration in which my web app will run. For example, the way WSAD works (you define a server instance and then you deploy the application in the specified server instance).

    Extra: What I have described is a simple case. But what if I am working on two different applications and:
    app1) : uses https and some special configs that go in the server.xml (tomcat)
    app2) : a complicated app that also affects the server.xml (dunno what, some special DataSources, JNDI resources and who knows what else).

    In this case having two different tomcat installations would help me develop those two applications without having to change the server.xml file each time I switch to develop the other app. Sugestions?

    Thanks,
    Alex

    #238362 Reply

    Riyad Kalla
    Member

    For your first problem, if the changes to the classes fail, as I mentioned, make sure you context is set to reloadable and Tomcat will reload the context anyway for you, it does not recognize property file changes however so you still need to restar it for that. I would also suggest that you keep the Tomcat Manager open in a browser window and get used to clicking “Restart”, this is about 20x faster then restarting the entire app server and will give you the same result for the app you are working on. Those two tips along should narrow your restarts down about 20:1

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Multiple tomcat5 installations

You must be logged in to post in the forum log in