"Brian S. Wallace" wrote:
> 
> My question is this.  I have two zones setup that point to two different
> directories.  The developers want to put class files in different
> subdirectories.  Setting up new repositories every time a developer creates
> a new subdirectory is really a pain.  The documentation suggests that the
> zone properties file for each zone be put into each developer's directory
> so that they can edit it themselves.  However, after it's edited, the web
> server has to be restarted, right?  This is not practical.
> 
> One part of the FAQ's talks about what I want to do with subdirectories,
> but it's not clear to me on how to make it work: packages.  If I create a
> new subdirectory in a zone, how do I make the classes in that subdirectory
> accessable?  Repositories, packages, what?  Please give me a example on how
> to do this.

I have also struggled with how to do this in a multi-user/multi-zone
environment such as you might find at an ISP. 

In an environment where everything runs a GSP template there is no
problem once the users zone file is set up as the GSPServlet has its own
initialisation file and you can force a reload and reinitialisation of
that class (and hence a reloading of the GSP init file) by 'touch'ing
the GSP jar file or any other jar file used in this zone. 

What I would like to see is some way to force a reinitialisation of the
relevant JServServletManager object (identifed by the zone name) to
support similar behaviour for the re-reading of a zone configuration
file. Developers, is there any chance of getting this sort of
functionality included? It would be an attractive selling point to any
ISP considering Apache-JServ as a multi-user shared web application
environment. How would you signal the  JServ class to destroy and
reconstruct the relevant JServServletManager? Perhaps a configuration
option to specify that when a 'startup servlet' needs to be reloaded the
whole zone file should be re-read?

As a solution to your problem Brian, can I suggest that to avoid changes
to your zone files, have your developers package all their classes into
a single jar file which is listed as a  repository in the zone file and
configure JServ to automatically reload classes when modified
(autoreload.classes=true in the relevant zone file) Ensure that this jar
file is not in the system classloaders path! ALternatively you could
have a  directory configured as a repository and copy your 'unjarred'
modified classes to an appropriate directory structure under that. If
your developers name their packages correspondingly the
AdaptiveClassLoader should always be able find and load the relevant
class.

Damian

-- 
Damian Fauth                                       201 Sussex Street
Software Engineer                                   Sydney, NSW 2000
John Fairfax Holdings Ltd                                  Australia
[EMAIL PROTECTED]                    Ph. (+612) 9282 3528


----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to