[Opensource] installing expresso in a subdirectory of the context

Michael Rimov rimovm at centercomp.com
Wed Nov 6 17:49:01 PST 2002


At 01:39 PM 11/6/2002 -0600, you wrote:
>I've been making several fixes to the code so that it'll work in a 
>subdirectory of the context (the 'expresso' directory as well as the 
>action definitions). Until now, I've been using ConfigManager.getMapping 
>on the class name of the action in order to get its mapping. Being that 
>the class name could change as easily as the path, now I'm wondering if 
>this is the way to go, or if we should just have a new ConfigManager property.

My biggest concern wouldn't be 'changing' the classname as it would be 
deriving from the DBMaint class and wanting my links to point to there... 
but I think you're hitting a wall that will be solved in the following:

I'm working on creating a 'service manager' where each service knows it's 
own config values [while there still will be global config values 
available, but that will become unusualy]... so ideally when we're looking 
to get a reference to DBMaint, then we'd write:

         Controller c = (Controller)ServiceLocator.locate("DBMaint");

         or

         Controller c = (Controller) 
ServiceLocator.locate("eForum").locate("DBMaint");

         and then we'd look up the mappings by:
         c.getClass().getName();

[I list the two possibilities above because sometimes a particular schema 
is going to want a customized controller but the creator doesn't want the 
responsibility of creating a new DBMaint for all of Expresso.]

Then at startup we only define what services are loaded and defined both 
globally, and what is defined for each nested component.

My big goal with this is to provide a decent management interface into 
Expresso components... in fact, we'll be pretty compatible with JMX when 
I'm done... all that will need to be done is to write a bridge class to 
translate each "component's" metadata into something either Apache 
Commons-modeler or the JMX api's can directly understand.  Another big goal 
is to play well with context reloading.  And finally, a final goal is to 
keep ConfigManager operational but @deprecate it so that we can offer a 
slow migration path to the new configuration system.

>
>For path related setup values, right now we have:
>Setup Database (om.jcorporate.expresso.services.dbobj.Setup)
>- ContextPath
>- BaseDir   ( I don't think this is currently being used - should we 
>remove it?)

It'll be a good setup value to remove for 5.1 I think.

>expresso-config.xml
>- images

Currently, I think most of the Expresso code is NOT using images, but is 
assuming a standard directory layout instead.

>- expressoDir
>
>It looks like the new property would be most suitable in dbobj.Setup 
>because it is a global setting.

Yes, I agree that in the Expresso definition for setup values it would work 
well.

>
>What should we name this new property? We already have 'BaseDir', but 
>that's the file system directory. How about 'BasePath'?

Sounds like a good idea.

Again, I'm mainly for this in the 5.1 code base.

Thanks for the feedback!
                                                 -Mike

                                         





More information about the Opensource mailing list