Hello, everybody!

I had configured the internal broker with this descriptor

<beans>
    <bean
        
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
    <broker brokerName="broker0" xmlns="http://activemq.org/config/1.0";>
        <managementContext>
            <managementContext connectorPort="1599"
                jmxDomainName="org.apache.activemq"/>
        </managementContext>
        <!-- The transport connectors ActiveMQ will listen to -->
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:1235" />
        </transportConnectors>
    </broker>
    <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>
</beans>

Pretty simple, the broker is started with this piece of code:

==================================================================================
final BrokerService broker = BrokerFactory.createBroker(new URI(
        "xbean:activemq.xml"));
broker.start();
==================================================================================

and the JMS client is started with this piece of code:

==================================================================================
final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
        
"tcp://localhost:1235?jms.blobTransferPolicy.uploadUrl=http://localhost:8161/fileserver";);
final ActiveMQConnection connection = (ActiveMQConnection) factory
        .createConnection();
System.out.println("Using upload url = "
        + connection.getBlobTransferPolicy().getBrokerUploadUrl());
connection.start();
==================================================================================

for some weird reason the upload URL is not propagated by the broker to the 
client, 
and in the output of the client I can see 

Using upload url = null

and then on each try to send and receive BlobMessage the stream is null.

I tried to set the upload url explicitly with

connection.getBlobTransferPolicy().setBrokerUploadUrl(
        "http://localhost:8161/fileserver";);

but this doesn't work either.

Could somebody please help?

-- 
Eugene N Dzhurinsky

Attachment: pgpVBlldJiNmp.pgp
Description: PGP signature

Reply via email to