General J2EE: File Transfer over MQ Series
Can anybody please tell me how to transfer a file over MQ Series? I can read the content of the file and send it using 'BytesMessage'. But the problem is using this approach, I won't be able to get the name of the file at receiver file.
Any better way out? Please reply.
Thanks in advance,
Why can you not put the file name in the message header? That way your listener on the other end can read the message, get the filename from the header and write the payload to a file of that name.
A better way would be to use a JAVA based FTP API. I googled for one and found this:
The best way would be to use an Enterprise grade file transfer tool.
Try this out. Read the input file. Append it into a StringBuffer object and write that object into the queue. Read from the queue and write back the contents into a file