activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raffaele <r.gambe...@prismasw.it>
Subject Embedded Broker - configuration via Java
Date Fri, 08 Jun 2007 09:22:02 GMT

Hi all,

I'm trying to create, configure and launch a broker all in one class.

I have a ClassNotFoundException executing the following lines:

BrokerService broker = new BrokerService();
broker.addConnector("tcp://localhost:61616");
broker.start();

And the exception thrown by addConnector(...) is this:

java.lang.NoClassDefFoundError:
javax/management/MalformedObjectNameException
	at
org.apache.activemq.broker.BrokerService.getManagementContext(BrokerService.java:696)
	at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1265)
	at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
	at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
	at
org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:163)
	at
org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:153)
	at pss.jms.EmbeddedBroker.main(EmbeddedBroker.java:49)

In my simple test project I'm including only the apache-activemq-4.*.jar
found in the activemq home directory.
1) Which other jar should I include?
2) Is there a page on your confluence where it is explained how to configure
a broker ALL using only Java without any xml and without Spring?

Thanks, best regards.

Raffaele



-- 
View this message in context: http://www.nabble.com/Embedded-Broker---configuration-via-Java-tf3888599s2354.html#a11023134
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message