• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Multiple instances of Tomcat 6, class loading experiencing problems for each instance

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So it turns out that my team has installed 2 instances of Tomcat 6 on our Red Hat server. This server is used for testing and each instance represents a layer of testing as it pertains to the migration path of our application development...

Anyway, we're trying to implement a fairly unique approach for class loading. Right now, we have demarcated Tomcat by providing our developers the means to reference "GLOBAL" jar files inside the $CATALINA_HOME/lib directory whereas for each testing stage (i.e. - "test1" and "test2"), we would like to provide the means to reference jar files inside each testing directory.

So to better illustrate our intentions, let's say you're working on our server and need to test it inside "test1" first before deploying into "test2." The only concern is that your application uses a specific jar file that provides some functionality a client needs, but you don't want it available to every instance--just test1.

In other words, how can we make each instance have their own lib? From what I understand, this involves the use of the CATALINA.PROPERTIES file, but I'm uncertain as to how this needs to be configured.

Any insight into this is appreciated.
 
Tom Z. Smith
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone? If you need more info, let me know. This problem is really making me scratch a hole into my head...
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tom Z. Smith wrote:
In other words, how can we make each instance have their own lib? From what I understand, this involves the use of the CATALINA.PROPERTIES file, but I'm uncertain as to how this needs to be configured.



If I understand your problem correctly, placing the jars under your app's WEB-INF/lib should work. Is this what you were asking?

PS. I think this question really belongs on the Tomcat forum instead of IDEs. Moving.
 
Tom Z. Smith
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Specifically, I'm trying to use a single installation of Tomcat 6 to provide our developers with the ability to use more than 1 instance of Tomcat and the problem I'm having pertains to how the JAR files aren't being loaded inside each instance's "lib" directory.

Example: I have 2 instances of Tomcat running on this machine (i.e. - "test1" and "test2"; both are used for various stages of testing and migration).
To start test1, I would use the following approximate console command: "test1_instance start".
For test2, it would be "test2_instance start", respectively.

Instead of putting all JAR files inside the root Tomcat lib directory, we thought it would be efficient to let each instance directory have their own lib directory and load stage-specific JAR files inside these while leaving all "GLOBAL" JAR files inside the Tomcat root's lib directory. Unfortunately, it's not working and we're pretty lost as to why.

test1 startup script -



test2 startup script -




And the "base" startup script that the above tie into has the following:


Do you have any idea what we're doing wrong here?
 
He was expelled for perverse baking experiments. This tiny ad is a model student:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic