2 Replies Latest reply on May 24, 2004 12:35 PM by Guy Rouillier

    Multiple instances of same server

    Guy Rouillier Newbie

      I've done a search on "multiple instances" and read the many messages on the subject. I'm familiar with services binding. I have a small variation on this theme, and I'm wondering if those more knowledgeable than me can tell me if I'm spinning my wheels. Here is what I've done. Using only the single server "default", I add an system property at startup time identifying the instance, e.g., -Dinstance=instance1. Then in default/conf/jboss-service.xml, I use the ${instance} marker in appropriate places to split out these multiple instances. For example, I pass that as the configuration name to the ServiceBinding manager, I add it to create a unique deploy directory for each instance, and I add it to log4j.xml so that I get a separate log directory for each instance. This works for the most part, with the benefit of not having to create a separate server definition (i.e., directory under jboss/server) for each instance. This is a labor saver if I just want to quickly provide identical instances to a set of developers.

      Finally my question. I've hit one snag with this approach. A JBoss server creates a tmp directory in which it copies deployed jars, sars, etc. My multiple instances are bumping into each other in this tmp directory. Is this the last hurdle I face with this approach? If I update the source to make the tmp directory configurable so that I can use ${instance}/tmp, will this approach now work error-free? Or are there additional traps waiting for me after this one, and should I just bite the bullet create separate server directories? Thanks.