You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-user@ws.apache.org by Liu Rui <rl...@yahoo.com.cn> on 2005/12/05 08:06:38 UTC

RE: Question on notification for internal property change

HI Ian,

I come back to this issue these days.

I find reason why the consumer can not get the notification is the provider
send mal formed notification message.  The message body is as follows;

<soapenv:Body>
	
<xml-fragmentxmlns:fil="http://ws.apache.org/resource/example/filesystem"xml
ns="">
		user files
	</xml-fragment>
</soapenv:Body>


I read the source code pubscrib 1.0.  I think it is because in the notify
method in SubscriptionListener.java, the  m_subscription.getUseNotify(  ) do
not return true so that the wrapMessageWithNotify() method do not be called.

I do know what's wrong with the code given below.  If I use the
notificationproducer.jsp to trigger a value change, every thing is ok.  

Thanks,
Ray.

-----Original Message-----
From: Ian Springer [mailto:ips@apache.org] 
Sent: Tuesday, November 22, 2005 12:34 PM
To: pubscribe-user@ws.apache.org
Subject: Re: Question on notification for internal property change

Rui Liu wrote:
> HI,  Since I am using the Apache muse 1.0 that still depends on the
Pubscribe 1.0,  I still use pubscribe 1.0.
>    
>   1.  I want to publish property changed notifications when a property is
internally changed with the following code.  It does not work.
>    
>   
>  TopicSpace muwsTopicSpace = ((NotificationProducerResource) 
> filesystemResource).getTopicSpaceSet() .getTopicSpace( 
> FilesystemPropertyQNames.COMMENT.getNamespaceURI());
>    
>   ResourcePropertyValueChangeTopicImpl topic = 
> (ResourcePropertyValueChangeTopicImpl) 
> muwsTopicSpace.getTopic(FilesystemPropertyQNames.COMMENT.getLocalPart(
> ));
>    
>   ResourcePropertyValueChangeEvent statusChangeEvent = new
XmlBeansResourcePropertyValueChangeEvent(
>    new Object[] { oldCommentXmlObj }, new Object[] { newCommentXmlObj 
> });
>    
>   topic.propertyChanged(statusChangeEvent); // I am not sure what the
propertyChanged do.
>   topic.publish(statusChangeEvent);
>   
To clarify, when you say it does not work, do you mean that you subscribed
to the Comment topic but don't receive a notification when you publish one
to that topic? Your code above looks good to me except that it's not
necessary to call both propertyChanged() and publish(), since
propertyChanged() ultimately hands off to publish().
>    
>    
>   2.  I try to use the Pubscribe 1.1 in Apache muse.  I simply remove the
pubscribe1.0.jar and copy the new 1.1 jar file to the muse lib directory.
There are errors when using ant compile deploy .
>    
>   
This is expected. Muse 1.0 is based on WSRF and Pubscribe 1.0, and will not
work with WSRF and Pubscribe 1.1 due to some incompatible API changes that
were made in 1.1.

Ian
>   Thanks,
>    
>   Ray
>
> 		
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in one click.  
>   

__________________________________________________
�Ͽ�ע���Ż����������������?
http://cn.mail.yahoo.com