[
https://issues.apache.org/jira/browse/MUSE-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465840
]
Christian Ewers commented on MUSE-182:
--------------------------------------
I found the problem, sorry I could see it myself. (see log-output below). The
SimpleEntry tries to remove itself from it's ServiceGroup without having one.
Simpleentry.java - line 155
ServiceGroup sg =
(ServiceGroup)getServiceGroup().getCapability(WssgConstants.SERVICE_GROUP_URI);
sg.removeEntry(getWsResource());
There should be a test, if sg is null. Perhaps as simple as this?
if(getServiceGroup()!=null){
ServiceGroup sg =
(ServiceGroup)getServiceGroup().getCapability(WssgConstants.SERVICE_GROUP_URI);
sg.removeEntry(getWsResource());
}
I think this should solve it.
But I think it would be better to test the possibility to schedule the
termination of the entry at the beginning of the createEntry-method before the
actual create-method. That would save resources and reduce message-exchanges
that are needed for the MemberShipRules-check.
======= muse.log from RegistryService ========
Jan 18, 2007 7:47:52 PM org.apache.muse.util.LoggingUtils logMessage
FINE: [SERVER TRACE] SOAP envelope contents (incoming):
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<wsa:To
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/RegistryService/services/ServiceGroup</wsa:To>
<wsa:Action
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroupRegistration/AddRequest</wsa:Action>
<wsa:MessageID
xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:ee700d40-ce82-3d86-ff18-ff5c8079e7f9</wsa:MessageID>
<wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
</wsa:From>
</soap:Header>
<soap:Body>
<wsrf-sg:Add xmlns:wsrf-sg="http://docs.oasis-open.org/wsrf/sg-2">
<wsrf-sg:MemberEPR>
<wsa:Address
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/DefaultService/services/WsResource</wsa:Address>
<wsa:ReferenceParameters
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId
xmlns:muse-wsa="http://ws.apache.org/muse/addressing">uuid:d9244a1a-767f-f1e0-7b3d-89128319d506</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsrf-sg:MemberEPR>
<wsrf-sg:InitialTerminationTime>2007-01-18T19:57:52+01:00</wsrf-sg:InitialTerminationTime>
</wsrf-sg:Add>
</soap:Body>
</soap:Envelope>
Jan 18, 2007 7:47:52 PM org.apache.muse.core.SimpleResource shutdownCapabilities
FINE: [ID = 'CapabilityPreparedForShutdown'] The resource at
'ServiceGroupEntry' has started the shutdown process on capability
'http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata'.
Jan 18, 2007 7:47:52 PM org.apache.muse.core.SimpleResource shutdownCapabilities
FINE: [ID = 'CapabilityPreparedForShutdown'] The resource at
'ServiceGroupEntry' has started the shutdown process on capability
'http://docs.oasis-open.org/wsrf/rpw-2/Get'.
Jan 18, 2007 7:47:52 PM org.apache.muse.core.SimpleResource shutdownCapabilities
FINE: [ID = 'CapabilityPreparedForShutdown'] The resource at
'ServiceGroupEntry' has started the shutdown process on capability
'http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroupEntry'.
Jan 18, 2007 7:47:52 PM org.apache.muse.core.SimpleResource shutdownCapabilities
FINE: [ID = 'CapabilityPreparedForShutdown'] The resource at
'ServiceGroupEntry' has started the shutdown process on capability
'http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer'.
Jan 18, 2007 7:47:52 PM org.apache.muse.core.SimpleResource shutdownCapabilities
FINE: [ID = 'CapabilityShutdown'] The resource at 'ServiceGroupEntry' has
completed the shutdown process for capability
'http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata.
Jan 18, 2007 7:47:52 PM org.apache.muse.core.SimpleResource shutdownCapabilities
FINE: [ID = 'CapabilityShutdown'] The resource at 'ServiceGroupEntry' has
completed the shutdown process for capability
'http://docs.oasis-open.org/wsrf/rpw-2/Get.
Jan 18, 2007 7:47:52 PM org.apache.muse.util.LoggingUtils logCall
FINE: [SERVER TRACE] Mapping SOAP request to Java method 'add'.
Parameter types expected by Java method:
[org.apache.muse.ws.addressing.EndpointReference, org.w3c.dom.Element,
java.util.Date]
Parameter types received by the MessageHandler:
[org.apache.muse.ws.addressing.EndpointReference, null (no type),
java.util.Date]
Messages about this call will appear below...
Jan 18, 2007 7:47:52 PM org.apache.muse.util.LoggingUtils logError
INFO: There was an error while processing a request:
null
org.apache.muse.ws.resource.sg.impl.SimpleEntry.shutdown(SimpleEntry.java:155)
org.apache.muse.core.SimpleResource.shutdownCapabilities(SimpleResource.java:559)
org.apache.muse.core.SimpleResource.shutdown(SimpleResource.java:492)
org.apache.muse.ws.resource.sg.impl.SimpleServiceGroup.createEntry(SimpleServiceGroup.java:145)
org.apache.muse.ws.resource.sg.impl.SimpleServiceGroup.addEntry(SimpleServiceGroup.java:88)
org.apache.muse.ws.resource.sg.impl.SimpleServiceGroupRegistration.add(SimpleServiceGroupRegistration.java:70)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.muse.core.SimpleResource.invoke(SimpleResource.java:369)
org.apache.muse.core.routing.SimpleResourceRouter.invoke(SimpleResourceRouter.java:286)
org.apache.muse.core.platform.mini.MiniIsolationLayer.handleRequest(MiniIsolationLayer.java:104)
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:65)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
15 more...
------------------------------------------
Jan 18, 2007 7:47:52 PM org.apache.muse.util.LoggingUtils logMessage
FINE: [SERVER TRACE] SOAP envelope contents (outgoing):
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<wsa:To
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To>
<wsa:Action
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/fault</wsa:Action>
<wsa:MessageID
xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:c3df34bb-c5fd-738d-57c7-eee136798b8d</wsa:MessageID>
<wsa:RelatesTo xmlns:wsa="http://www.w3.org/2005/08/addressing"
RelationshipType="wsa:Reply">uuid:ee700d40-ce82-3d86-ff18-ff5c8079e7f9</wsa:RelatesTo>
<wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:8080/RegistryService/services/ServiceGroup</wsa:Address>
</wsa:From>
</soap:Header>
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text/>
</soap:Reason>
</soap:Fault>
</soap:Body>
</soap:Envelope>
> ServiceGroup.add must return a fault if it can not process a given
> InitialTerminationTime
> -----------------------------------------------------------------------------------------
>
> Key: MUSE-182
> URL: https://issues.apache.org/jira/browse/MUSE-182
> Project: Muse
> Issue Type: Bug
> Components: WSRF WSSG ServiceGroup
> Affects Versions: 2.1.0
> Reporter: Christian Ewers
> Assigned To: Dan Jemiolo
> Fix For: 2.2.0
>
>
> I tried to add a Resource to a ServiceGroup with an InitialTerminationTime
> by using the standard WS-ServiceGroupEntry-1_2.wsdl.
> But the Entries were never destroyed...
> I figured out that I didn't declare the wsrl-TerminationTime and
> wsrl-CurrentTime properties and I didn't declare the
> ScheduledTermination-Capability.
> The SimpleServiceGroup capability checks for the
> ScheduledTermination-Capability and only if it gets it it schedules the
> terminaton of the entry.
> When looking for the fault I found a incompatibility to the specification.
> According to the standard the add() method should fail when it can not
> schedule the termnination:
> From http://docs.oasis-open.org/wsrf/wsrf-ws_service_group-1.2-spec-os.pdf
> - line 493
> ---
> If the ServiceGroup is unable or unwilling to set the TerminationTime
> resource property of the ServiceGroupEntry resource to the given value of
> the "absolute time" form or a value greater, then the Add request MUST
> fault"
> ---
> So I think the createEntry-method of the SimpleServiceGroup should throw a
> AddRefusedFault when it can't find the "scheduled-termination"-capability.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://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]