on 11-13-2006 10:42 AM
Hello experts,
1.
I want to retrieve the value of <b>Target directory</b> for a file <b>reciever</b> communication channel inside module. Is it possible? Any code samples?
2. My audit logs are not getting printed inspite of having a log-configuration.xml in place and proper audit log statements in the code? anybody face similar situations before? These statements are inside a <b>reciever file</b> adapter module.
--
Amol
Amol,
For question 1, a blog was published recently to access adapter speciifc identifiers or dynamic configuration details from inside a module . take a look at it, should solve your problem,
/people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kapil,
file.targetFileName
In General put the following piece of code in sender or receiver adapter and u can get all the parameters specific to that Adapter Type in channel(Configuration) for outbound and inbound channel depending on direction of channel in which module is configured.
String[] chattr=ch.getAttributeNames();// ch is channel object
If u put this in receiver module of file adapter, the string array will hold the names of all the parameters pertaining to Receiver File Adapter(file.targetFileName,file.targetDir,etc). Same procedure holds good for sender channel.
Once u get the parameter name, u can get the value as given by my earlier post in this thread.
Hope this helps.
Regards,
Sudharshan
Sudharshan
Thank you very much for your quick reply.
Actually, I m trying to append system date and time to the file name and send it back. With your help, I was successful in retrieving the file's name but now I want to send it back. I checked the api 's for channel but it does nt allow to set the new value for the file name. How can I achieve this ? any pointers will be very helpful
awaiting your reply
Regards
Kapil
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.