On Wed, 22 Jan 2003, David Keyes wrote:

> Date: Wed, 22 Jan 2003 17:09:44 -0500
> From: David Keyes <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: Resources for a Context
>
> I would be happy to make any modifications that would be required.  I've spent a bit 
>of time looking around at the source already, but I'm not sure what the best approach 
>would be.  It would be nice if it could be done in a "plugin" kind of way, but after 
>looking around a bit, it seems that the concept of a single physical directory as a 
>docbase is pretty ingrained (comments?).
>
> So far, I've looked at the following:
>
> 1. Writing a new catalina Context implementation
> 2. Writing a new jndi DirContext implementation, that would be configurable to take 
>multiple directories
>
> Of those two, I think #2 makes the most sense, but I have doubts as to
> whether it would solve the problem.  What I'm afraid of is that the
> changes required are peppered throughout the Tomcat codebase.  Any
> pointers that you could give me to get me started in the right direction
> initially would be hugely appreciated.
>

#2 makes sense to me.  Basing your class on the existing code in
FileDirContext (in particular, you'll probably want to subclass
BaseContext), but allowing it to be configured with multiple directories,
should keep you very insulated from the rest of the Tomcat internals.
The rest of Tomcat just works through DirContext.

You'll have to decide what to do when there's more than one of the
directories that have a file or subdirectory of the same name -- perhaps
in the order that the directories are configured.

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to