atom feed13 messages in[Proposal] Preparatory refactoring fo...
FromSent OnAttachments
Mark ThomasJun 15, 2012 10:00 am 
Konstantin KolinkoJun 16, 2012 8:28 am 
Mark ThomasJun 16, 2012 10:19 am 
Konstantin KolinkoJun 16, 2012 10:37 am 
Mark ThomasJun 16, 2012 11:18 am 
Mark ThomasJun 16, 2012 2:42 pm 
Christopher SchultzJun 18, 2012 1:34 pm 
Konstantin KolinkoJul 29, 2012 5:16 pm 
Mark ThomasJul 30, 2012 7:18 am 
Konstantin KolinkoJul 30, 2012 7:48 am 
Mark ThomasJul 30, 2012 8:24 am 
Konstantin KolinkoAug 17, 2012 8:50 am 
Mark ThomasAug 19, 2012 11:35 am 
Subject:[Proposal] Preparatory refactoring for Resource handling refactoring
From:Mark Thomas (
Date:Jun 15, 2012 10:00:32 am


Servlet 3.1 looks like it is going to introduce 'overlays' or something similar along the lines of the enhancement request [1].

Tomcat already has aliases, VirtualDirContext and resource JAR support - each implemented slightly differently. Things are already rather messy and will get worse if we build on what we currently have. I have therefore been looking at a new Resources implementation for Tomcat 8 that is not based on DirContext.

Along the way I have noticed a few related refactorings that will be required / would make life easier. They are:

1. Move Loader and Resources from Container to Context The docs already state these are only for Contexts and they don't make much sense on other Containers.

2. Move Mapper to o.a.catlina.connector.mapper It is only used here and removing DirContext means it will have a hard dependency on o.a.c.resources (or wherever the new implemenation goes) so can't stay in o.a.tomcat.util

I'd like to complete these before I start the main refactoring to a) do things in stages b) do the bigger refactoring from a slightly cleaner start.

The broader refactoring aims to provide aliases, overlays, resource JARs and anything else along those lines through a common interface with the implementations going directly to the file system. Access via URLs will also be supported but direct access to the file system will be preferred. I have some rough ideas for this. My plan is to commit the new classes as I go along so folks can comment and provide feedback but only commit the changes to existing classes once I have everything working.

Since this is fairly major work, any objections before I start?