Charles Benett wrote:
>
> Luke,
> There are some design documents in the Avalon CVS. However, avalon
> itself is evolving.
> If you want the source to the avalon classes used in James (assuming you
> are using the current dist or CVS version of JAMES), you can get these
> from the avalon-james-1-1b1 branch of the framework cvs module. Earlier
> messages tell you how.
> Charles
The Avalon website is updated with some documentation that covers
some of the design principles behind Avalon. The documentation
like the framework is a work in progress.
> Lukas Bradley wrote:
> >
> > Forgive my ignorance, but I am new to James, and this
> > mailing list. I have a host of questions to ask, as I
> > am working my way through the source.
> >
> > I am attempting to write a servlet/JSP interface to
> > the Account Administrator. It's my understanding that
> > one does not exist, and I don't want everyone to have
> > to use the telnet interface.
> >
> > My questions are as follows:
> >
> > (1) What is the ComponentManager, and how is it
> > instantiated?
> >
> > In the org.apache.james.remotemanager.RemoteManager
> > init(), it is referenced immediately, not
> > instantiated, and declared as private in the class.
> > Where the hell does it come from?
The ComponentManager is assigned by the instantiating
entity. That means that for Blocks, the kernel
instantiates the Block, gives it the ComponentManager,
and gives it the Configuration element. This is
called inversion of Control.
> > The reason I ask is...
> >
> > (2) How is the UsersRepository instantiated?
> >
> > This looks like the thing I want to interface with.
> > But it doesn't look like I can get a copy of it
> > without the ComponentManager, and I'm sure this is
> > running as a service.
That's the design. You should not be able to directly
access any other block without going through the defined
channels: ComponentManager, or in the case of SMTP using
the protocol. Remember the ComponentManager is assigned
from the entity that created the Component. That means
that the Composer/Block (Component User) can only access
Components/Blocks that it is allowed to access.
> > Part of my problem is the implicit import of classes.
> > For instance, import org.apache.avalon.* This
> > confuses matters.
I beleive this is fixed in Avalon CVS. Unfortunately,
Avalon CVS will not work with James yet. Once Avalon
is finished with it's new set of features, and a new
release is made, we can migrate James to work with it.
(Hopefully, it won't be too hard--many of the semantics
are the same).
> > I'm trudging my way through the classes, but can't
> > find any of them.
Start with the Kernel. It instantiates all the Blocks,
and assigns what they need. Then look at the Block in
question, and work your way down to where you need to
be.
Check the docs on the Avalon site, they will help you.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]