activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suchitha Koneru \(sukoneru\)" <>
Subject RE: access to embedded broker
Date Fri, 29 Jun 2007 01:03:25 GMT
Thank you so much Mario for the link. I tried to use an embedded broker
with top connector. 
An Exception was raised stating that 

Could not connect to broker URL: vm:(broker:(tcp://localhost:61716)).
Reason: Failed to start database 'derbydb', see the
next exception for details.


The Context.xml  has Active MQ connection Factory defined as follows 

        	description="JMS Connection Factory"

The code for creating the Topic Connection is as follows :
private TopicConnection getConn() {	

		TopicConnectionFactory Herbiefactory = null;
		javax.jms.TopicConnection HerbieTopic=null;
			Herbiefactory =

//		 TopicConnection for subscribing and receiving events

	HerbieTopic = Herbiefactory.createTopicConnection(); //
exception occurs at this line, I think the Herbie Factory is null , and
hence the exception	
		catch(Exception e){
			 logger.error("error in creating topic
ocnnection method "+e.getMessage());
		return HerbieTopic;

I am not using  activemq.xml , I would like mention all the broker
related configuration in the broker URI. The context.xml is present in
Tomcat/conf directory.  Iam using active mq 4.0 is embedded broker
supported in this version ?
Any idea as to why the factory is becoming null ?

Thank you,


-----Original Message-----
From: Mario Siegenthaler [] 
Sent: Thursday, June 28, 2007 2:57 PM
Subject: Re: access to embedded broker

Did you check the "Sharing embedded broker across webapp
contexts"-thread (last week)? This was the exact same problem and
serveral possible solutions (at least one of them I tested personally).
Easy way: put the activemq in the common/lib and just let the to webapps
connect to vm://localhost. Ways you can add a tcp-Connector to this
broker are described in the other thread or in the vm-tp-reference


On 6/28/07, Suchitha Koneru (sukoneru) <> wrote:
> I also observed that when configuring an embedded broker  Tomcat 
> automatically starts the embedded broker when "vm" transport is used 
> and not for "tcp " transport.
> Thanks,
> Suchitha.
> -----Original Message-----
> From: Suchitha Koneru (sukoneru)
> Sent: Thursday, June 28, 2007 12:45 PM
> To:
> Subject: access to embedded broker
> Hello Active Mq users ,
>                    Can an external  java process get access to an 
> embedded broker ? In our application we  have
> Tomcat server with two Web apps , Web App A and Web app  B.   These
> web apps exchange messages via the embedded broker.
>  Is the  embedded broker confined only to the JVM in which it is 
> started ?? in our case the embedded broker is started within the JVM 
> of Tomcat.Can an external java process connect to the embedded broker 
> and sent messages to these two web apps ? This process is entirely in 
> a different JVM .
> Please let me know,  Based on your response I will have to decide if I

> have use  an embedded broker with "VM" transport or an external broker

> with "TCP" transport.
> thank you so much,
> Suchitha.

View raw message