You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by SARA1232007 <cy...@foxmail.com> on 2009/03/16 14:12:25 UTC

Questions about Muse Capabilities

Hi,

I have following quesiton about  Muse Capabilities:

1. I guess the function of muse configuration capability can be done by
WS-ResourceProperties SetResourceProperty and GetResourceProperty, that's
why muse configuration capability do nothing. 
What I don't understand is then what can muse configuration capability do?

2. the shutdown() operation performed by SimpleResource do two things: call
prepareShutdown() by each of its capabilities, then call shutdown() by each
of its capabilities, and at last removeResource from ResourceManager. In
AbstractCapability.java,  prepareShutdown() does nothing, and shutdown()
only change the value of _hasBeenShutdown flag. What is Is _hasBeenShutdown 
used for? Is _hasBeenShutdown flag be check before each invocation of a
capability? And more important, how does muse release the resources occupied
by Resouce and capabilities?

3. Almost every WSDM capability has a PROPERTIES field to present
propertyQNames. How is it initialized? What value will propertyQNames for
each WSDM capability to take?

Hope someone could do some help.

Thanks
Sara
-- 
View this message in context: http://www.nabble.com/Questions-about-Muse-Capabilities-tp22537855p22537855.html
Sent from the Muse - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


Re: Questions about Muse Capabilities

Posted by Andrea Gazzarini <a....@gmail.com>.
"And more important, how does muse release the resources occupied by Resouce
and capabilities?"
> I think that if we are talking about a your custom capability it should be
up to you (overriding)...because muse cannot know in advance internal
details of your implementation...

Regards,
Andrea

2009/3/16 Andrea Gazzarini <a....@gmail.com>

> 1. I did not get the point of your first question : what is  "muse
> configuration capability"?
> 3. It is initialized on concrete implementor of your capability. You can
> see that on the apache-httpd example.
> In the mentioned example the array of QNames is statically declared on the
> capability interface while the corresponding (concrete) getter is declared
> on the capability implementation.
>
> Regards,
> Andrea
>
>
> 2009/3/16 SARA1232007 <cy...@foxmail.com>
>
>
>> Hi,
>>
>> I have following quesiton about  Muse Capabilities:
>>
>> 1. I guess the function of muse configuration capability can be done by
>> WS-ResourceProperties SetResourceProperty and GetResourceProperty, that's
>> why muse configuration capability do nothing.
>> What I don't understand is then what can muse configuration capability do?
>>
>> 2. the shutdown() operation performed by SimpleResource do two things:
>> call
>> prepareShutdown() by each of its capabilities, then call shutdown() by
>> each
>> of its capabilities, and at last removeResource from ResourceManager. In
>> AbstractCapability.java,  prepareShutdown() does nothing, and shutdown()
>> only change the value of _hasBeenShutdown flag. What is Is
>> _hasBeenShutdown
>> used for? Is _hasBeenShutdown flag be check before each invocation of a
>> capability? And more important, how does muse release the resources
>> occupied
>> by Resouce and capabilities?
>>
>> 3. Almost every WSDM capability has a PROPERTIES field to present
>> propertyQNames. How is it initialized? What value will propertyQNames for
>> each WSDM capability to take?
>>
>> Hope someone could do some help.
>>
>> Thanks
>> Sara
>> --
>> View this message in context:
>> http://www.nabble.com/Questions-about-Muse-Capabilities-tp22537855p22537855.html
>> Sent from the Muse - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: muse-dev-help@ws.apache.org
>>
>>
>

Re: Questions about Muse Capabilities

Posted by Andrea Gazzarini <a....@gmail.com>.
1. I did not get the point of your first question : what is  "muse
configuration capability"?
3. It is initialized on concrete implementor of your capability. You can see
that on the apache-httpd example.
In the mentioned example the array of QNames is statically declared on the
capability interface while the corresponding (concrete) getter is declared
on the capability implementation.

Regards,
Andrea


2009/3/16 SARA1232007 <cy...@foxmail.com>

>
> Hi,
>
> I have following quesiton about  Muse Capabilities:
>
> 1. I guess the function of muse configuration capability can be done by
> WS-ResourceProperties SetResourceProperty and GetResourceProperty, that's
> why muse configuration capability do nothing.
> What I don't understand is then what can muse configuration capability do?
>
> 2. the shutdown() operation performed by SimpleResource do two things: call
> prepareShutdown() by each of its capabilities, then call shutdown() by each
> of its capabilities, and at last removeResource from ResourceManager. In
> AbstractCapability.java,  prepareShutdown() does nothing, and shutdown()
> only change the value of _hasBeenShutdown flag. What is Is _hasBeenShutdown
> used for? Is _hasBeenShutdown flag be check before each invocation of a
> capability? And more important, how does muse release the resources
> occupied
> by Resouce and capabilities?
>
> 3. Almost every WSDM capability has a PROPERTIES field to present
> propertyQNames. How is it initialized? What value will propertyQNames for
> each WSDM capability to take?
>
> Hope someone could do some help.
>
> Thanks
> Sara
> --
> View this message in context:
> http://www.nabble.com/Questions-about-Muse-Capabilities-tp22537855p22537855.html
> Sent from the Muse - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-dev-help@ws.apache.org
>
>

Re: Questions about Muse Capabilities

Posted by Chris Twiner <ch...@gmail.com>.
Andrea has already answered some of the questions.  Just to narrow
down some points....

On Mon, Mar 16, 2009 at 2:12 PM, SARA1232007 <cy...@foxmail.com> wrote:
>
> Hi,
>
> I have following quesiton about  Muse Capabilities:
>
> 1. I guess the function of muse configuration capability can be done by
> WS-ResourceProperties SetResourceProperty and GetResourceProperty, that's
> why muse configuration capability do nothing.
> What I don't understand is then what can muse configuration capability do?

All of the base capabilities are based upon the MUWS and WSDM specs.
Custom capabilities are composable and an appropriate level of
functionality per logical capability.

> 2. the shutdown() operation performed by SimpleResource do two things: call
> prepareShutdown() by each of its capabilities, then call shutdown() by each
> of its capabilities, and at last removeResource from ResourceManager. In
> AbstractCapability.java,  prepareShutdown() does nothing, and shutdown()
> only change the value of _hasBeenShutdown flag. What is Is _hasBeenShutdown
> used for? Is _hasBeenShutdown flag be check before each invocation of a
> capability? And more important, how does muse release the resources occupied
> by Resouce and capabilities?

They have some usage in the 2.2.1 code base, and will have further use
in 2.3.0 allowing for restarts.

> 3. Almost every WSDM capability has a PROPERTIES field to present
> propertyQNames. How is it initialized? What value will propertyQNames for
> each WSDM capability to take?

It is initialised by the standard java mechanism for statics and arrays:

    private static final QName[] _PROPERTIES = new QName[]
    {
        new QName(NAMESPACE_URI, "CPUload", PREFIX),
        new QName(NAMESPACE_URI, "FrameDropping", PREFIX)
    };

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org