I don't see anybody assigned to tackling the Catalina 4.0 FileStore
implementation, or the Manager implementation for swapping active
sessions to disk, so I've started messing around with this. If anyone
else is interested in working on this (or already working on this) speak
up!
So far I'm looking to implement the FileStore class by cribbing code
from StandardManager's load() and unload() methods, to store session
data in individual files named with the session ID. I've also created a
class called PersistentManager which will use this store.
I'd be interested in hearing comments on how the architect (Craig?)
who drafted up the Store class intended it to interact with Manager
and the rest of the container. I could also use some pointers in a
few areas, in particular:
- How exactly does the Container decide which Manager implementation
to load? I've found in startup.Catalina.createStartMapperContext():
mapper.addRule(prefix + "/Manager",
mapper.objectCreate
("org.apache.catalina.session.StandardManager",
"className"));
... but I'm guessing there's a way to override this in server.xml?
- I'll need to figure out how to make the choice of Store class configurable.
Any pointers on this would be appreciated.
- The FileStore implementation I'm using needs to get access to the
Container. Is there a recommended way to do this? At this point I've
actually modified the Store interface to add setManager() and getManager()
methods, which the Manager uses when instantiating its Store - this
way the Store can get at most of the things it might need.
Thanks,
Kief