activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugeny N Dzhurinsky <>
Subject Re: Starting Jetty to serve blobs with embedded broker
Date Wed, 06 Aug 2008 11:24:00 GMT
On Tue, Aug 05, 2008 at 06:10:20AM -0700, Joe Fernandez wrote:
> Hi Eugeny,
> You can try starting the embedded broker with a brokerURL that specifies a
> config file, and have the config file include a <> element. 
> With this brokerURL the cfg file must be in the application???s CLASSPATH. 
> vm://localbroker?brokerConfig=xbean:activemq.xml
> With this one, you're specifying an absolute path to the cfg file.
> vm://localbroker?brokerConfig=xbean:file:C:/tmp/activemq.xml

Hello, Joe!

Thank you for quick reply, however things are not clear for me :)

Looks like the way I am creating the broker is incorrect:

        final BrokerService broker = BrokerFactory.createBroker(new URI(

Gives the error:

0 [main] INFO org.apache.xbean.spring.context.ResourceXmlApplicationContext  - Refreshing
org.apache.xbean.spring.context.ResourceXmlApplicationContext@4a63d8: display name [org.apache.xbean.spring.context.ResourceXmlApplicationContext@4a63d8];
startup date [Wed Aug 06 14:19:13 EEST 2008]; root of context hierarchy
152 [main] INFO org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader  - Loading
XML bean definitions from class path resource [activemq.xml]
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException:
Unrecognized xbean namespace mapping:
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(

and the activemq.xml file looks like


    <broker brokerName="broker0" xmlns="">
            <managementContext connectorPort="1599"
        <!-- The transport connectors ActiveMQ will listen to -->
            <transportConnector name="openwire" uri="tcp://localhost:1235" />
    <jetty xmlns="">
            <nioConnector port="8161" />
            <webAppContext contextPath="/admin"
                resourceBase="webapps/admin" logUrlOnStart="true" />
            <webAppContext contextPath="/demo"
                resourceBase="webapps/demo" logUrlOnStart="true" />
            <webAppContext contextPath="/fileserver"
                resourceBase="webapps/fileserver" logUrlOnStart="true" />

Did I miss some dependency on Jetty?

I am using Maven to build and execute the test application, and I specified the dependencies
as below


Thank you in advance!

Eugene N Dzhurinsky

View raw message