mail notification plugin weird logs and source code
my logs from the mail plugin are at the bottom of this mail....Notice the "skipping subscription of user dhiller since not our scheduler name: [daily]". What does this mean? I notice my properties file has often, hourly, daily, and weekly. All are commented out except for often which is set to every 1 minute for now as I test this out. I do a google and find the following code snippet....Why is only daily firing and not often. I am very confused here. thanks for any help....dean + Collection userDocs = xwiki + .getStore () + .searchDocuments ( + ", BaseObject as obj where obj.name=CONCAT(XWD_WEB,'.',XWD_NAME) and obj.className='XWiki.XWikiUsers'", + context); + for (Iterator iter = userDocs.iterator (); iter.hasNext ();) + { + // XWikiDocument doc = xwiki.getDocument ((String) iter.next (), + // context); + XWikiDocument doc = (XWikiDocument) iter.next (); + if (doc != null) + { + BaseObject obj = doc.getObject (EmailNotificationPlugin.SUBSCRIPTION_CLASS); + + if (obj != null) + { + String schedulerName = obj + .getStringValue (EmailNotificationPlugin.FIELD_SCHEDULER_NAME); + if (name.equals (schedulerName)) + { + retval.add (obj); + if (LOG.isDebugEnabled ()) + LOG.debug ("adding subscription of user " + doc.getName ()); + } else + { + if (LOG.isDebugEnabled ()) + LOG.debug ("skipping subscription of user " + doc.getName () + + " since not our scheduler name: " + schedulerName); + } + } + } + } 18:05:00,011 INFO scheduler1_Worker-2 email notification sender: often NotificationSender:run:220 - email notification sender thread up and running. 18:05:00,011 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:run:230 - have 1 modifications... 18:05:00,012 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:checkForTooNewModifications:263 - lastChangeDateForNotification: Tue Jan 03 18:04:50 MST 2006 18:05:00,034 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:getAllSubscriptions:477 - skipping subscription of user dhiller since not our scheduler name: [daily] 18:05:00,034 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:run:242 - 0 subscriptions for wiki xwiki 18:05:20,320 WARN Finalizer JDBCContext:finalize:333 - afterTransactionCompletion() was never called 18:06:00,012 INFO scheduler1_Worker-1 email notification sender: often NotificationSender:run:220 - email notification sender thread up and running. 18:06:00,013 DEBUG scheduler1_Worker-1 email notification sender: often NotificationSender:run:223 - nothing to do, exiting
It's kind of difficult to help here. The email notification plugin has been written by a contributor. That probably needs a little testing. First CONCAT(XWD_WEB,'.',XWD_NAME) can be replaced by doc.fullName (this is non critical) I would like to reintegrate the email notification plugin as a module. Maybe that could be done with the maven2 work Ludovic Hiller, Dean a écrit :
my logs from the mail plugin are at the bottom of this mail....Notice the "skipping subscription of user dhiller since not our scheduler name: [daily]". What does this mean? I notice my properties file has often, hourly, daily, and weekly. All are commented out except for often which is set to every 1 minute for now as I test this out. I do a google and find the following code snippet....Why is only daily firing and not often. I am very confused here. thanks for any help....dean
+ Collection userDocs = xwiki + .getStore () + .searchDocuments ( + ", BaseObject as obj where obj.name=CONCAT(XWD_WEB,'.',XWD_NAME) and obj.className='XWiki.XWikiUsers'", + context); + for (Iterator iter = userDocs.iterator (); iter.hasNext ();) + { + // XWikiDocument doc = xwiki.getDocument ((String) iter.next (), + // context); + XWikiDocument doc = (XWikiDocument) iter.next (); + if (doc != null) + { + BaseObject obj = doc.getObject (EmailNotificationPlugin.SUBSCRIPTION_CLASS); + + if (obj != null) + { + String schedulerName = obj + .getStringValue (EmailNotificationPlugin.FIELD_SCHEDULER_NAME); + if (name.equals (schedulerName)) + { + retval.add (obj); + if (LOG.isDebugEnabled ()) + LOG.debug ("adding subscription of user " + doc.getName ()); + } else + { + if (LOG.isDebugEnabled ()) + LOG.debug ("skipping subscription of user " + doc.getName () + + " since not our scheduler name: " + schedulerName); + } + } + } + }
18:05:00,011 INFO scheduler1_Worker-2 email notification sender: often NotificationSender:run:220 - email notification sender thread up and running.
18:05:00,011 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:run:230 - have 1 modifications...
18:05:00,012 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:checkForTooNewModifications:263 - lastChangeDateForNotification: Tue Jan 03 18:04:50 MST 2006
18:05:00,034 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:getAllSubscriptions:477 - skipping subscription of user dhiller since not our scheduler name: [daily]
18:05:00,034 DEBUG scheduler1_Worker-2 email notification sender: often NotificationSender:run:242 - 0 subscriptions for wiki xwiki
18:05:20,320 WARN Finalizer JDBCContext:finalize:333 - afterTransactionCompletion() was never called 18:06:00,012 INFO scheduler1_Worker-1 email notification sender: often NotificationSender:run:220 - email notification sender thread up and running.
18:06:00,013 DEBUG scheduler1_Worker-1 email notification sender: often NotificationSender:run:223 - nothing to do, exiting
------------------------------------------------------------------------
-- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
participants (2)
-
Hiller, Dean -
Ludovic Dubost