resource = (WsResource)manager.createResource(endpoint);
}
catch (SoapFault error)
{
throw new ResourceInitializationFault(error);
}
//
// make sure the entry resource can process termination time, if
// one exists. if it can't, the request was invalid.
//
// NOTE: we do NOT shutdown() the resource because it has not
// been initialize()d yet.
//
if (termination != null && !resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
{
Object[] filler = { endpoint, WsrlConstants.SCHEDULED_TERMINATION_URI };
throw new AddRefusedFault(_MESSAGES.get("NoWSRL", filler));
}
//
// set the sg entry fields before initializing the entry resource
//
Entry entry = (Entry)resource.getCapability(WssgConstants.ENTRY_URI);
entry.setServiceGroup(sg);
entry.setMemberEPR(epr);
try
{
resource.initialize();
manager.addResource(resource.getEndpointReference(), resource);
}
catch (SoapFault error)
{
throw new ResourceInitializationFault(error);
}
//
// set termination time AFTER we initialize so that we can rely
// on the base Resource class' implementation of WS-RL (which