/**
* @see AbstractWSResource#emitTerminationNotification()
*/
protected void emitTerminationNotification( )
{
NotificationManager notifMgr = getNotificationManager( );
if ( notifMgr != null )
{
TopicDocument topicDoc = TopicDocument.Factory.newInstance( );
XmlBeansUtils.setupTopicExpressionType( ResourceLifetime11Constants.NSURI_WSRL,
ResourceLifetime11Constants.TOPIC_QNAME_RESOURCE_TERMINATION
.getLocalPart( ),
topicDoc.addNewTopic( ) );
TerminationNotificationDocument termNotifDoc = TerminationNotificationDocument.Factory.newInstance( );
TerminationNotification termNotif = termNotifDoc.addNewTerminationNotification( );
termNotif.setTerminationTime( Calendar.getInstance( ) );
try
{
notifMgr.emit( topicDoc,
XmlBeansUtils.toSOAPElement( termNotifDoc ) );
}
catch ( Exception e )
{
// TODO: what to do if we fail to emit this notification?