----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Ben,

    There are a plethora of parameters in jserv.properties that you should
read the explainations for to see if one sounds like what you are looking
for, but those seem to exist only for the single JVM that will be handling
JServ requests.
    If I understand your question correctly, here's how you may have to do
it - and you would probably have to change your classes a bit to use it.
Your java properties (like state1 connects to one db server on port 4100,
the other connects to another server listening on port 4400; State1 should
log to /my/app/state1/logs, while State2 logs to /my/app/state2/logs; etc.)
are read and stored by a different servlet for each state when you start
JServ.  In the state1_zone.properties file, you have a parameter for the
startup servlet - servlets.Startup=State1Start - or whatever you name the
servlet that collects the environment properties.  (That servlet would be
found within one of your repositories.)  Then there's a parameter to pass
the startup servlet some initial arguments, and that's
servlet.State1Start.initArgs=someproperty=/path/to/state1.properties.  Same
thing happens in state2_zone.properties.  So we design a servlet for each
state that collects properties variables, enable it to start when you first
start JServ, and pass it the location of the state1.properties or
state2.properties file first thing, so each one knows where to go get its
variables from.  Then each app gets its parameters from that startup servlet
instead of from the JVM.
    Before you go to all that trouble, I think you better really read each
of those parameters in jserv.properties and see if you can conceive of a
better plan for yourself.
    I *hope* I understood what you were asking for.  The weird thing about
me answering questions on this list is that I don't know hardly a lick about
java programming - that's another department's job.  My job is to get our
software running in as many different combinations of environments as
possible so we can offer our customers anything their little hearts desire -
but our choice is always Apache/JServ on RH Linux if they have no
preference.  So I have no knowledge of how a startup servlet would actually
be written, but I know about the technique because of what I have to do to
get us running.  Perhaps it wasn't at all what you were speaking of.

Garrison Roberts
Enable Technologies, Inc.

----- Original Message -----
From: Ben Ricker <[EMAIL PROTECTED]>
To: Java Apache Users <[EMAIL PROTECTED]>
Sent: Friday, April 28, 2000 10:48 AM
Subject: Re: Running multiple Apache/Jservs


> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> Thank you for your very helpful post, Garrison! Your idea is intriguing
and
> may be what we need since we may just run BOTH states from the one
> production Apache/Jserv instance using the Virtual Host scheme.
>
> Let me add some kickers in it. One advantage I see with this setup lies in
> the fact that the servlets can work for BOTH states; the only difference
is
> the properties file the java calls to make DB connections, default
numerical
> values, etc.  One problem is that the call to the properties file is
> something like /propertyname.properties. When we ran this setup on Sun's
> Java Web Server, it defaulted to the root directory of of the Java Web
> Server subdirectory. When we ported everything to Redhat Apache/Jserv, I
had
> to put the properties file in the root directory of the file system. So,
the
> only differnce I can see is that I may have to somehow redirect the java
> embedded property calls for state1 to the state1.properties file (not the
> servlet properties, mind you, but the java properties) and state2 java
> properties calls to the state2.properties file.
>
> Does this sound possilble on a server side configuration change rather
than
> changing the classes (thereby losing one advantage of the Virtual Host
> setup)? I was thinking of some sort of URL redirect or mod_rewrite (maybe?
> not sure).
>
> Ben Ricker
> US-Rx
>
>
>
>
>
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]
>
>



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to