You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Jeremy Volkman <jv...@gmail.com> on 2007/08/13 20:10:53 UTC

[DS] Immediate component being registered as delayed

Hi all,

It seems that if I don't explicitly specify 'immediate="true"' in my
component description, Felix DS assumes it to be delayed.  I then get
errors which say that my component is marked delayed but provides no
services.

>From the spec, section 112.2.2:

"A component is an immediate component if it is not a factory
component and either does not specify a service or specifies a service
and the immediate attribute of the component element set to true."

Is this requirement represented in code anywhere?  The only places I
can find dealing with whether or not a component is immediate are:

[XmlHandler.java]
// immediate attribute is optional
if(attrib.getProperty("immediate") != null) {
    m_currentComponent.setImmediate(attrib.getProperty("immediate").equals("true"));
}

[ComponentMetadata.java]
if(m_immediate == false && m_service == null) {
    throw new ComponentException("Component '"+m_name+"' is specified
as being delayed but does not provide any service.");
}

Thanks

-Jeremy

Re: [DS] Immediate component being registered as delayed

Posted by Jeremy Volkman <jv...@gmail.com>.
Sure thing Felix --
https://issues.apache.org/jira/browse/FELIX-337

-Jeremy

On 8/14/07, Felix Meschberger <fm...@gmail.com> wrote:
> Hi Jeremy,
>
> Thanks for pointing this out. Can you please file a JIRA issue ? I will
> fix it ASAP.
>
> In fact, the default value of the immediate attribute depends on the
> presence of a <service> element: If the element is present, the default
> is "false", if the element is NOT present, the default is "true".
> Currently, the default is always "false".
>
> Thanks and Regards
> Felix
>
> Am Montag, den 13.08.2007, 14:10 -0400 schrieb Jeremy Volkman:
> > Hi all,
> >
> > It seems that if I don't explicitly specify 'immediate="true"' in my
> > component description, Felix DS assumes it to be delayed.  I then get
> > errors which say that my component is marked delayed but provides no
> > services.
> >
> > >From the spec, section 112.2.2:
> >
> > "A component is an immediate component if it is not a factory
> > component and either does not specify a service or specifies a service
> > and the immediate attribute of the component element set to true."
> >
> > Is this requirement represented in code anywhere?  The only places I
> > can find dealing with whether or not a component is immediate are:
> >
> > [XmlHandler.java]
> > // immediate attribute is optional
> > if(attrib.getProperty("immediate") != null) {
> >     m_currentComponent.setImmediate(attrib.getProperty("immediate").equals("true"));
> > }
> >
> > [ComponentMetadata.java]
> > if(m_immediate == false && m_service == null) {
> >     throw new ComponentException("Component '"+m_name+"' is specified
> > as being delayed but does not provide any service.");
> > }
> >
> > Thanks
> >
> > -Jeremy
>
>

Re: [DS] Immediate component being registered as delayed

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Jeremy,

Thanks for pointing this out. Can you please file a JIRA issue ? I will
fix it ASAP.

In fact, the default value of the immediate attribute depends on the
presence of a <service> element: If the element is present, the default
is "false", if the element is NOT present, the default is "true".
Currently, the default is always "false".

Thanks and Regards
Felix

Am Montag, den 13.08.2007, 14:10 -0400 schrieb Jeremy Volkman:
> Hi all,
> 
> It seems that if I don't explicitly specify 'immediate="true"' in my
> component description, Felix DS assumes it to be delayed.  I then get
> errors which say that my component is marked delayed but provides no
> services.
> 
> >From the spec, section 112.2.2:
> 
> "A component is an immediate component if it is not a factory
> component and either does not specify a service or specifies a service
> and the immediate attribute of the component element set to true."
> 
> Is this requirement represented in code anywhere?  The only places I
> can find dealing with whether or not a component is immediate are:
> 
> [XmlHandler.java]
> // immediate attribute is optional
> if(attrib.getProperty("immediate") != null) {
>     m_currentComponent.setImmediate(attrib.getProperty("immediate").equals("true"));
> }
> 
> [ComponentMetadata.java]
> if(m_immediate == false && m_service == null) {
>     throw new ComponentException("Component '"+m_name+"' is specified
> as being delayed but does not provide any service.");
> }
> 
> Thanks
> 
> -Jeremy