[ 
http://issues.apache.org/jira/browse/MUSE-164?page=comments#action_12458589 ] 
            
Dan Jemiolo commented on MUSE-164:
----------------------------------

I think I know what the issue is - you're setting the status in the 
initialize() method, before all of the capabilities are guaranteed to be 
initialized. The initialize() method is only for tasks that are specific to 
your capability (don't involved other capabilities). This is covered in the 
programming model docs - see


http://ws.apache.org/muse/docs/2.1.0/manual/architecture/programming-model.html#capabilities

and

http://ws.apache.org/muse/docs/2.1.0/javadoc/org/apache/muse/core/Capability.html#initializeCompleted()


What's happening is that you're setting the status to AVAILABLE, and the after 
that, the OperationalStatus capability's initialize() is called, and it sets it 
to UNKNOWN.

If you move your code to initializeCompleted() instead of initialize(), the 
problem will go away. Let me know if this switch works.


> OperationalStatus not changeable?
> ---------------------------------
>
>                 Key: MUSE-164
>                 URL: http://issues.apache.org/jira/browse/MUSE-164
>             Project: Muse
>          Issue Type: Bug
>          Components: WSDM MUWS OperationalStatus
>    Affects Versions: 2.1.0
>         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of 
> wsdl2java, and manual build (no eclipse used)
>            Reporter: Jürgen Mangler
>         Assigned To: Dan Jemiolo
>
> I added the following to MyCapability.java
> public void initialize() throws SoapFault {
>   super.initialize();
>   WsResource res = this.getWsResource();
>  OperationalStatus stat = 
> (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
>  stat.setOperationalStatus(OperationalStatus.AVAILABLE);
>  this.getLog().info(stat.getOperationalStatus());
> ...
> }
> Which results in an AVAILABLE entry in the log file. However running a client 
> an querying operational status results in the following:
> <soapenv:Body>
> <wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2"; 
> xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2";>
> <pfx0:OperationalStatus 
> xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd";>Unknown</pfx0:OperationalStatus>
> </wsrf-rp:GetResourcePropertyResponse>
> </soapenv:Body> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to