[Building Sakai] notifications not being sent for drop boxchanges

Stephen Marquard stephen.marquard at uct.ac.za
Fri May 15 04:28:17 PDT 2009


Hi,

This is now fixed in kernel 1.0.8 (KNL-185)

Cheers
Stephen  
 
>>> DAVID ROLDAN MARTINEZ <darolmar at upvnet.upv.es> 05/15/09 1:26 PM >>> 
Can you post your fix to a JIRA, please?

Thank you very much in advance.

David

De: sakai-dev-bounces at collab.sakaiproject.org [mailto:sakai-dev-bounces at collab.sakaiproject.org] En nombre de Charles Hedrick
Enviado el: martes, 12 de mayo de 2009 21:19
Para: sakai-dev at collab.sakaiproject.org Dev
Asunto: [Building Sakai] notifications not being sent for drop box changes

In 2.6, and possibly also 2.5, users aren't getting email notifications when files are added to the dropbox. I have a fix, but I'd like to ask whether I've fixed it the right way.

In BaseContentService.java, where the system is setting up to watch for events, it watches for EVENT_RESOURCE_AVAILABLE and EVENT_RESOURCE_WRITE for normal resources and EVENT_RESOURCE_ADD and EVENT_RESOURCE_WRITE for drop boxes. This sounds right, except that the events get transmogrified. In commitResourceEdit, the original event is sent out only for REVISE events. Other events are sent through, but with notifications off. The real notification occurs as a result of postAvailableEvent. This checks to see whether the resource is available. If so it does the real notification. If not, it schedules a delayed event. The postAvailableEvent ignores the original event type, and always uses EVENT_RESOURCE_AVAILABLE. Thus the drop box notification code must watch for EVENT_RESOURCE_AVAILABLE. It's likely that it doesn't need to watch for EVENT_RESOURCE_ADD, since adds will probably get changed to available. However for the moment I'm simply adding dbNoti.setFunction(EVENT_RESOURCE_AVAILABLE); to BaseContentService.java, at the same place as the other calls to dbNoti.setFunction. I believe that fixes the problem.


However the question is why postAvailableEvent changes the event type. Is that really necessary?





More information about the sakai-dev mailing list