Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Tom Z. Smith
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
  • 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...
 
Maneesh Godbole
Saloon Keeper
Posts: 11196
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic