[JBoss JIRA] Created: (JBESB-193) Need support for notification generatoin from within ActionProcessor.process method
by Tom Fennelly (JIRA)
Need support for notification generatoin from within ActionProcessor.process method
-----------------------------------------------------------------------------------
Key: JBESB-193
URL: http://jira.jboss.com/jira/browse/JBESB-193
Project: JBoss ESB
Issue Type: Task
Security Level: Public (Everyone can see)
Affects Versions: 4.1
Reporter: Tom Fennelly
Assigned To: Mark Little
Fix For: 4.1
In version 4.0, the Action Processing pipeline management code raises notifications in response to an exception from the ActionProcessor.process method. The pipeline managemnt code calls the getOkNotification (no exception) or getErrorNotification (exception) to get the notification message.
For many reasons, this is a very flawed model. Notifications should be raised from within the process method by means of attaching the notifications (error or otherwise) to the message (the mechanism is a design issue). Once the process method returns, the pipline processing management code can check the message for notifications. If there are errors, it can/should (?) abort the message processing, send the error notification (by whatever notification options are configured on the listener) and signal the failure to the calling process (by whatever failure config is configured on the listener).
The getOk and getErro methods can then be removed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[JBoss JIRA] Created: (JBESB-192) Listener implementations need to perform the payload to Message wrapping, not the AbstractListener
by Tom Fennelly (JIRA)
Listener implementations need to perform the payload to Message wrapping, not the AbstractListener
--------------------------------------------------------------------------------------------------
Key: JBESB-192
URL: http://jira.jboss.com/jira/browse/JBESB-192
Project: JBoss ESB
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0
Reporter: Tom Fennelly
Assigned To: Mark Little
Priority: Blocker
Fix For: 4.0
I may be missing something here but, I think there's an issue with the Listeners/Action/Messages that probably requires more immediate attention.
The AbstractListener calls the receive method of its implementation (DirectoryPoller etc) in order to get messages from the delivery channel associated with the implementation. At the moment, the receive method returns an Object[] and AbstractListener does the job of converting/wrapping these Objects into Message implementations before pushing the Message instances through the associated pipeline for processing. The AbstractListener also performs the job of triggering "lifecycle" events on the implementation i.e. processingError and processingComplete. In order for these method implementations to perform the appropriate "channel specific" tasks relating to the processing of the message, they need access to "special" info that should be hidden in the message and not accessible to anyone else other than that Listener impl. Hopefully this will make more sense through an example....
The DirectoryPoller listens on the Filesystem for file based message. It manage the lifecycle of these messages as follows:
1. Before it's receive method impl returns the java.io.File associated with the message, it renames the file to "working" so that the file is not picked up for processing again. In fact, it actually returns an extension of java.io.File (WorkingFile) which contains "hidden" info that the Listener uses when message lifecycle events are called (processingError and processingComplete).
2. In response to a call to it's "processingError" implementation, it should get passed the original message object it returned from it's receive method (WorkingFile). WorkingFile is a inner class to DirectoryPoller and it contains a few private methods that only WorkingFile and DirectoryPoller can call. In the case of processingError being called, the DirectoryPoller wants to call the private method "renameToError".
3. In response to a call to it's "processingComplete" implementation, the DirectoryPoller wants to call the private method "renameToDone".
The Issue:
The AbstractListener implementations should be doing the wrapping of the message payload objects in the relevant Message implementations (not the AbstractListener itself as is currently the case). This way, the channel specific listener implementation can add the channel specific info it needs to the message before returning it for pipeline processing (e.g. the rename to error/done file names etc in the case of the DirectoryPoller). This also means that the receive method definition would need to be changed to return a Message[] (instead of an Object[]) and the lifecycle management methods (processingError and processingComplete) changed to take type Message (Vs type Object).
Without making these changes, the lifecycle info will very likely get lost in the pipeline because it's currently being set on the Message body/payload, which will very likely get changed during pipeline processing.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months