*
The moose likes Tomcat and the fly likes Multiple instances of Tomcat 6, class loading experiencing problems for each instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Multiple instances of Tomcat 6, class loading experiencing problems for each instance" Watch "Multiple instances of Tomcat 6, class loading experiencing problems for each instance" New topic
Author

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

Tom Z. Smith
Greenhorn

Joined: Aug 17, 2011
Posts: 6
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

Joined: Aug 17, 2011
Posts: 6
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

Joined: Jul 26, 2007
Posts: 10172
    
    8

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Tom Z. Smith
Greenhorn

Joined: Aug 17, 2011
Posts: 6
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple instances of Tomcat 6, class loading experiencing problems for each instance
 
Similar Threads
Problem While Deploying the WebService
websphere multiple server instances and log4j
creating extracting jar file with external jar
Servlet Oracle
What to do with edited servlet.