[jboss-user] [JBoss Messaging] - Re: How to Store a Text File in JMS Queue : setobject

PeterJ do-not-reply at jboss.com
Thu Jan 15 16:48:08 EST 2009


Are you saying that you want to send the java.io.File object in the message so that the receiver can read the file? If so, that is not possible. Nor is it possible to send a java.io.Stream/Writer/whatever. These objects, besides probably not being serializable, do not contain the file contents anyway. And I assume that you are interested in getting the file contents to the receiver. In which case the only option is to read the file contents and send those in the message.

Another option - if both the sender and receiver has visibility to the file, you could just send the full path name.  This would work, for instance, in a Windows environment if you used a UNC name (example: \\myhost\sharename\path\to\the\file.txt).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202265#4202265

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202265



More information about the jboss-user mailing list