geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Blewitt <>
Subject Re: [components] [JNDI] [Config] - lazy loading...
Date Sat, 09 Aug 2003 08:59:07 GMT
> J2EE decomposes nicely into a bunch of APIs*. We just need 
> a persistant registration service. The first time you run up Geronimo, 
> all services start, declaring that e.g. they implement javax.naming or 
> javax.servlet etc... (package granularity should be enough). Deployers 
> also register their interest in e.g. WebContainer:war etc...

I think that JNDI would provide an excellent registration service, 
especially to follow with previous suggestions about using JNDI for 
storing configuration data. [Of course, it pre-supposes that the JNDI 
service is one of the 'core' services that is already up :-)]

You could then set aside a context, such as geronimo/startup/services/ 
and when installing a new service for the first time (such as during 
application install, or plugin install at a later stage) then it can 
write an entry in there, such as 
geronimo/startup/services/JavaMail=org.apache.mail.Xxxx which is then 
used to register the service and what it can do.

> These deps are saved away, and next time you start Geronimo, put to 
> good use - the dependency tree is shaken out and only services 
> required are loaded. This behaviour could be switchable, to load 
> lazily in development and proactively in production.

It would probably just be a matter of a startup switch that configured 
one behaviour over another. In fact, a generic switch to say 'run in 
development mode' or 'run in server mode' would probably have wider 
ramifications to other services as well, such as whether they cached 
information or dynamically obtained it each time.

> If you upgrade or add new services, jars, their presence would 
> invalidate the relevant part of the cached dependency tree or index.

Installing a plug-in could be a matter of writing a few entries into 
this list :-)

> I don't want something like this to get in the way of getting a server 
> out of the door ASAP, but I'd like it to be considered if anyone 
> starts working, out on  branch, on the ultimate plug-in component 
> system for Geronimo services...

I can see a very easy transition towards this if we go with the JNDI 
representation layer with a configuration interface. We could then move 
the definition of these services into that registry layer ...


View raw message