After following steps in wiki, the embedded broker starts successfully!! Now I included two jars - activemq-all-5.0.0.jar and commons-logging-1.1.jar
but I got this exception when my queue producer initialized : java.lang.NoSuchMethodError: org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/jms/Destination; I guess I missed to include certain jar? Well, I'd also want to get more information about monitoring embedded queue and I also wonder how to solve the issue of fast producers and slow consumers, because in future projects I can not handle how fast or slow the producers will be! Sincerely, Jean rajdavies wrote: > > > I updated the wiki - but this might take a while before its published > to the amq site: > http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html?refresh=1 > Basically you can do something like this: > > BrokerService broker = new BrokerService(); > broker.setName("fred"); > broker.addConnector("tcp://localhost:61616"); > broker.start(); > > Then remote clients can use the tcp://somehost:61616 uri to bind to > the embedded broker - and in JVM clients can use vm://fred > > With regards to the class path error - which jars are you using ? > > cheers, > > Rob > > > Rob Davies > 'Go further faster with Apache Camel!' > http://rajdavies.blogspot.com/ > > > > On Dec 18, 2007, at 5:43 AM, JS75 wrote: > >> >> First, thank you for your apply~ >> >> I tried to assign name to each embedded broker. >> And these twn connections starts successfully, however, they do not >> work as >> I wish! >> >> As URI as tcp://localhost:61616, producers send messages and consumers >> receive messages. >> After assigning names, they seemd to work without any relationship. >> >> Is there any thing I can do to make embedded VM broker as embedded TCP >> broker? >> >> BTW, I tried to upgrade activeMQ to 5.0, and I found this exception in >> console >> java.lang.NoSuchMethodError: >> org >> .apache >> .activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/jms/ >> Destination; >> >> Have I misses to include any lib? >> >> Sincerely, >> Jean >> >> >> >> ttmdev wrote: >>> >>> Try assigning different names to your two embedded brokers. For >>> example, >>> >>> ActiveMQConnectionFactory connectionFactory = >>> new ActiveMQConnectionFactory(vm://clientbroker); >>> >>> ActiveMQConnectionFactory connectionFactory = >>> new ActiveMQConnectionFactory(vm://serverbroker); >>> >>> Joe >>> >>> >>> >>> JS75 wrote: >>>> >>>> Dear Sirs: >>>> >>>> As a neophyte of activeMQ, I encountered some tasks, and please >>>> help me >>>> to solve them >"<! >>>> >>>> I tried to embedded one broker into my connections - >>>> producer (ClientSide) and consumer (ServerSide) >>>> separately in >>>> one JVM. >>>> >>>> ActiveMQConnectionFactory connectionFactory = >>>> new ActiveMQConnectionFactory(vm://localhost); >>>> >>>> >>>> However, when I started these two connections, the latter one has >>>> above >>>> messages in cosole >>>> >>>> org.apache.activemq.store.DefaultPersistenceAdapterFactory >>>> createJournal >>>> 資訊: Journal is locked... waiting 10 seconds for the journal >>>> to be >>>> unlocked. >>>> >>>> Unless did I close the former connection (usually Producer >>>> connection), >>>> the latter broker started (Consumer connection received)? >>>> But I wish each of them can work in pararrel as TCP can do? >>>> Did I make any mistake or forget to do any configurations? >>>> >>>> Sincerely, >>>> Jean >>>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Journal-is-locked-tp14375869s2354p14384479.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> > > > > > -- View this message in context: http://www.nabble.com/Journal-is-locked-tp14375869s2354p14429142.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.