-
1. Re: Meta-data attached to messages
marklittle Jul 6, 2007 8:33 AM (in response to sebcio)Thanks. I'll take a look and get back to you.
-
2. Re: Meta-data attached to messages
burrsutter Jul 6, 2007 9:41 AM (in response to sebcio)Mark recently told me about a change to the Systemprintln action that will dump the contents of the Message to the console. You can stick the following in helloworld_file_action quickstart to see it in action (assuming SVN head, not MR2):
<action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln"> <property name="printfull" value="true"/> </action>
There may be more options available to get even more information. Using this trick I'm now able to see that there is a property called "org.jboss.soa.esb.gateway.original.file.name" as one example.
However, I do not see the date time the message entered the system.
But this trick will at least tell you what is available. -
3. Re: Meta-data attached to messages
derek.adams Jul 6, 2007 10:51 AM (in response to sebcio)I added the property for original file name a while back because of a business requirement in my company. The problem I ran into was the information about the incoming file (file system or ftp) is only available in gateway code and is not available when the filters are processed. For the short term, we may want to add other properties in the same place where the original file name is added.
-
4. Re: Meta-data attached to messages
sebcio Jul 6, 2007 11:07 AM (in response to sebcio)Hi Derek,
could you tell me, how did you do it? Where is the proper place to "decorate" the message with this informations (did you customized the orginal file gateway)? This is exactly what I need - filename, size, date...
Thx -
5. Re: Meta-data attached to messages
derek.adams Jul 6, 2007 12:33 PM (in response to sebcio)I added the extra metadata in the org.jboss.soa.esb.listeners.gateway.AbstractFileGateway class (base class for file and ftp gateways). If you look in the doRun() method in the loop that iterates over matching files, the property is added right after the message is created by the composer. I can add the other props if needed -- basically anything available in java.io.File could be added.
-
6. Re: Meta-data attached to messages
marklittle Jul 6, 2007 4:21 PM (in response to sebcio)I'll take a look at this and see if I can make it as extensible as the filter approach.
-
7. Re: Meta-data attached to messages
marklittle Jul 7, 2007 3:32 AM (in response to sebcio)See this. Once I update the documentation, I'll check this stuff in. Should be later today.
-
8. Re: Meta-data attached to messages
marklittle Jul 7, 2007 3:34 AM (in response to sebcio)And this to see when it's in trunk.
-
9. Re: Meta-data attached to messages
sebcio Jul 7, 2007 10:44 AM (in response to sebcio)Hi Mark,
great job! I think, it's great value-added to other projects, so they can fullfil such requirements as loging inputs on gateways. Thanks! -
10. Re: Meta-data attached to messages
marklittle Jul 7, 2007 4:47 PM (in response to sebcio)OK, it's in. Check the section on meta-data and filters in the programmers guide for details. And please note the changes in signatures and property names from the last MR.
-
11. Re: Meta-data attached to messages
marklittle Jul 7, 2007 4:48 PM (in response to sebcio)"derek.adams" wrote:
I added the property for original file name a while back because of a business requirement in my company. The problem I ran into was the information about the incoming file (file system or ftp) is only available in gateway code and is not available when the filters are processed. For the short term, we may want to add other properties in the same place where the original file name is added.
Derek, please take a look at the changes I made and make sure they still do what you need. If not, let me know and I'll modify appropriately.