|
From: sappenin <do-...@jb...> - 2006-07-06 18:12:10
|
I think the internal MailListener.send() function contract should still be clarified inside of the JBCS code. For example, the MailListener.send() function specifies: "@return the message containing what could not be handled by this listener, null if the whole message was consumed". However, as stated in this thread's original message, null messages break the ListenerChain code. With the current Listener code, one must return a non-null Mail/Message object that has handled "to" addresses removed. If the message has been fully handled, the Mail/Message must have an empty List of "to" addresses. So, does anyone have pros/cons for either method? It seems like returning null from the "Send" function to indicate that the message has been fully "taken care of" would be the cleanest method. However, there might be an instance where a listener that is last in the chain may want to do something with a message (even though no "to" addresses exist in the message anymore), and receiving a null would not be a good thing here. An Audit Listener might do something like this. For example, save a message to the audit log only if it has been fully processed. Any opinions? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955967#3955967 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955967 |