activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Buss <marco.b...@gmx.de>
Subject Re: Broker upload url is null?
Date Thu, 07 Aug 2008 13:23:26 GMT
Eugeny N Dzhurinsky schrieb:
> On Thu, Aug 07, 2008 at 02:43:33PM +0200, Marco Buss wrote:
>   
>> Eugeny N Dzhurinsky schrieb:
>>     
>>> On Thu, Aug 07, 2008 at 02:18:40PM +0200, Marco Buss wrote:
>>>   
>>>       
>>>> First try this.  Set CopyMessageOnSend to false on your connection. See 
>>>> http://www.nabble.com/A-problem-with-blobmessage-on-activemq-5.0-td15523989.html#a17364301
>>>> If this is true (default) the Upload does not work.
>>>>     
>>>>         
>>> Really, this setting solved the issue when the blob wasn't even tried to be
>>> uploaded, however I'm getting weird issue with jetty now - it complains 
>>>
>>> "PUT was not successful: 405 HTTP method PUT is not supported by this URL"
>>>
>>> on the URL I specified as one to be used for file upload. Looks like XBean
>>> configuration for Jetty needs to be updated somehow?
>>>
>>>   
>>>       
>> The so called fileserver webapp must run on the upload URL.
>>     
>
> The configuration for jetty in axtivemq.xml
>     <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
>         <connectors>
>             <nioConnector port="8161" />
>         </connectors>
>         <handlers>
>             <webAppContext contextPath="/admin"
>                 resourceBase="webapps/admin" logUrlOnStart="true" />
>             <webAppContext contextPath="/demo"
>                 resourceBase="webapps/demo" logUrlOnStart="true" />
>             <webAppContext contextPath="/fileserver"
>                 resourceBase="webapps/fileserver" logUrlOnStart="true" />
>         </handlers>
>     </jetty>
>
> Currently I can browse http://localhost:8161/fileserver/, so looks like the
> web application is up. What else do I need to do in this configuration file in
> order to allow the blob to be uploaded on the server?
>
> Another question is - I learned it is possible to write the stream directly to
> the queue (http://activemq.apache.org/jms-streams.html)
>
> The only thing which is not clear for me - how can I assign the stream to
> certain message? Do I need to generate an unique name for the stream, upload
> the content to the queue, then produce the message and provide the name for
> the saved stream in one of the message properties? Or there is some another
> way? And how efficient the streams are in comparison to blob messages?
>
> The task I need to solve is exchange the data between hosts, the data is
> mostly large images of several tens or hundreds of megabytes in size.
>
>   
remove the setting of the blobUploadStrategy from your code an use this 
brokerURL to initialise your ActiveMQConnectionFactory

tcp://localhost:1235?jms.*blobTransferPolicy*.defaultUploadUrl=http://localhost:8161/fileserver/

Mime
View raw message