I appreciate your reply, and thanks.
but it still doesn't work!
I create a BLOB message using a File / InputStream as the command argument.
BlobMessage message =  session.createBlobMessage(new File("E://test.pdf"));
The sending program seems work fine, but when I tried to get the file data
using a consumer, it gets nothing! (the inputstream I get is null,
therefore, nullpoint exception)
I've tried inputstream way too, but failed again...
I strongly recommend folks try and see what happens about the API... 


James.Strachan wrote:
> 
> On 8/13/07, OnlyLove <[EMAIL PROTECTED]> wrote:
>>
>> I send the blob message using...
>>
>> BlobMessage message = session.createBlobMessage(new
>> URL("http://localhost:8080/test.pdf";));
>>
>> then, I close the tomcat server, and try to get the message from the amq
>> broker,
>> fail ! (it seems that the blob message just send the url to the broker,
>> but
>> not the real data of the file!)
> 
> This is by design. If you create a blob message using a URL, the
> assumption is that the URL points to some hosted file server / web
> server and that is where the data will remain.
> 
> If you want ActiveMQ to actually take ownership of the data, then
> create a BLOB message using a File / InputStream as the command
> argument. See the JavaDoc.
> 
> http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/ActiveMQSession.html#createBlobMessage(java.net.URL)
> 
> also the documentation explains this
> http://activemq.apache.org/blob-messages.html
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Blob-Message-is-a-skin-game----not-real--%21---tf4260124s2354.html#a12124829
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to