Hello Marco!
Ufff.. failed to grasp it all at a glance.. Printing out to
read it in the evening comfortably seated with a cup of tea..
A detailed answer to follow.
Currently only a few remarks, if you allow me to :)
GMF> uff, I have to say, hard job, but it works :-)
Congratulations, Marco!
I feel a little bit guilty, perhaps I could have
done more to make the job easier for you. Sorry.
GMF> But I did it in other way (like your a.2 ...).
GMF> Before I start, a little note...
GMF> yes, I know the problem with nested container and accessing
GMF> components. But with using role-/configfiles a have a little
GMF> 'size-problem', so therefore I tried to separate them.
In fact the problem with roles file seems to be more or less
resolved by now. Please take a look at the @avalon and @x-avalon
tags you find in the tests for Fortress. You put them directly
to the implementaion class, run <fortress-meta> ant task
(see how this is done for the tests) and voi la -- you need no
roles file at all :-)
As for the configuration, you're absolutely right, the size
problem does exist.
I did not get it from your first mail, so my a.2 solution
was about still having all config in one file.
What did you end up with?
Did you have separate configuration files for your
containers or a single one?
GMF> (remind, my specialContainer has more then 80 components, and
GMF> the same size is the parentContainer-config. So, this is the
GMF> reason why I want to separate them from each other. Maybe you asking
GMF> yourself why so many components ? -> I am running in an EJB-Server and
GMF> these containers host the DAOImpls / EJB-Business-Impls to make them
GMF> configurable and rechangable without changing EJB-Business-structure)
Great! :-)
Would be very interested to know what your overall architecture is.
But I suppose that I will have a chance to ask you more questions
on about your architecture, etc. later on.
I'm in particular interested to know
* what kind of EJB-s are you backing up with Avalon
components (Stateless?)
* how have you plugged Fortress into the EJB container.
Is it residing inside a single bean?
* what is your EJB container?
GMF> So, more details...
GMF> The approach Unico gave to me I used to build a
GMF> "NestedContainer"-Interface.
GMF> public interface NestedContainer extends Initializable, Serviceable,
GMF> Disposable, Component {
GMF> // to initialize the container
GMF> public void initialize() throws Exception;
GMF> // to get the serviceManager from parentContainer
GMF> public void service(ServiceManager manager) throws ServiceException;
GMF> // to get an instance of the container
GMF> public ServiceManager getServiceManagerInstance() throws
GMF> AvalonException;
GMF> // to dispose things correctly
GMF> public void dispose();
GMF> }
I have yet to study your mail in more details.
The quick impression is a surprise. As far as I understand the
main working method of this interface is
public ServiceManager getServiceManagerInstance()
isn't it?
Then I would expect that interface would look like
poublic interface NestedContainer
{
String ROLE = NestedContainer.class.getName();
public ServiceManager getServiceManagerInstance() throws ...;
}
but maybe I have missed something..
GMF> Futhermore, my specialContainer(WMSContainer) is a component of his
GMF> parentContainer
GMF> (implements Component... and NestedContainer as well).
Probably the Component interface may be safely ommited :-)
Okay, after this point I need more in-depth reading of your
mail. To be continued :-)
- Anton
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]