a) I am getting the following error while trying to run my application.
java.lang.IllegalStateException: Cannot respond to resolve request as the
appliance appliance:/tutorial/Hello3 is in a non-commissioned state.
at
org.apache.avalon.activation.impl.DefaultAppliance.resolve(DefaultAppliance.
java:162)
at
org.apache.avalon.activation.impl.ApplianceInvocationHandler.getInstance(App
lianceInvocationHandler.java:172)
at
org.apache.avalon.activation.impl.ApplianceInvocationHandler.invoke(Applianc
eInvocationHandler.java:110)
at $Proxy9.execute(Unknown Source)
Is there related to the ordering in which the components should be started.
If yes, then what is the best way to declare the components in block.xml.
b) When there are two components providing the same service, then is it
possible to dynamically load a particular service implementation by
providing the dependency key.
ie.. in the following example
<component name="gloria" class="tutorial.IdentifiableComponent"/>
<component name="nancy" class="tutorial.IdentifiableComponent"/>
<component name="hello" class="tutorial.HelloComponent">
<dependencies>
<dependency key="primary" source="gloria"/>
<dependency key="secondary" source="nancy"/>
</dependencies>
</component>
Is it possible to load the service based on the key "primary". (I want to
dynamically load even after declarinng the dependencies in the xml because
then i can manually commission the models)
ComponentModel model = (ComponentModel)
m_containmentModel.getModel(reference);
model.commission();
Object obj = model.resolve();
-Aseem
----- Original Message -----
From: "Stephen McConnell" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Sent: Monday, April 19, 2004 12:09 PM
Subject: Re: merlin's use of .xinfo
> Aseem Bansal wrote:
> > Niclas,
> >
> > Can you give me an example of how to wire the dependency to a particular
> > implementation.
>
> http://avalon.apache.org/merlin/starting/tutorial/dependencies/manual.html
>
> Cheers, Steve.
>
> >
> > -Aseem
> >
> > ----- Original Message -----
> > From: "Niclas Hedhman" <[EMAIL PROTECTED]>
> > To: "Avalon framework users" <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 07, 2004 5:19 AM
> > Subject: Re: merlin's use of .xinfo
> >
> >
> >
> >>On Wednesday 07 April 2004 07:33, Olaf Bergner wrote:
> >>
> >>
> >>>>What happens when there are two implementations of the same
> >>>>service? Does the container simply check that versions of the
> >>>>implementations are different, or complain if they are the same?
> >>
> >>Merlin will choose one, unless you manually 'wire' the dependency to a
> >>particular implementation.
> >>
> >>Niclas
> >>--
> >>+---------//-------------------+
> >>| http://www.bali.ac |
> >>| http://niclas.hedhman.org |
> >>+------//----------------------+
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>Fiorano MailServer
> >>All incoming and outgoing mails are scanned for Virus and Spam
> >>http://www.fiorano.com
> >
> >
> >
> > Fiorano MailServer
> > All incoming and outgoing mails are scanned for Virus and Spam
> > http://www.fiorano.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
>
> |------------------------------------------------|
> | Magic by Merlin |
> | Production by Avalon |
> | |
> | http://avalon.apache.org/merlin |
> | http://dpml.net/merlin/distributions/latest |
> |------------------------------------------------|
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> Fiorano MailServer
> All incoming and outgoing mails are scanned for Virus and Spam
> http://www.fiorano.com
Fiorano MailServer
All incoming and outgoing mails are scanned for Virus and Spam
http://www.fiorano.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]