Greetings Avalonian, Excaliburian and Fortress Masters. I am in need of
help.

I am looking at the Fortress examples and am wondering how to start all
my stuff.

By looking at the Main of the Swing example I see that I have to :
1) build my 4 XML documents and load them in a FortressConfig instance. 
2) run the setContainerConfiguration(), setLoggerManagerConfiguration(),
setRoleManagerConfiguration() and setInstrumentManagerConfiguration()
3) Then a ContainerManager is instantiated with a
DefaultContainerManager and after that
ContainerUtil.initialize(ContainerManager) is executed with the
ContainerManager, previously instantiated, in parameter.
4) finally run() is called after a getContainer() is done to get the
container.

What I want to do as a first step for a test is:

1) Make a container contain 2 services (Note services and not
container). 
2) One service implement a get method that returns "A" and the other
make a get method that returns a "B".
3) What puzzles me, in the example above, is that I see that we simply
do the getContainer()!?!?! (shouldn't it be named a getService() or
something like that??? ) with absolutely no parameter to select the one
that I want and then do a run on the returned Object. What I need is to
be able to select a particular service based in a parameter to the
getContainer and then call the getA or getB from one another with the
returned reference and system.out.println the result. 

This would be enough for a small test that could get me running
afterward for an implementation.

a) I know that I might not be very clear but can someone points me on
the general implementation steps I would need to do to do that?
b) Am I mistaken in calling my service a service, should it be called a
container?


Thanks in advance

Dominique Paquin
 

Reply via email to