Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » ActiveMQ Integration(How to drop in ActiveMQ broker)
ActiveMQ Integration [message #930481] Tue, 02 October 2012 11:07 Go to next message
Alex Bond is currently offline Alex BondFriend
Messages: 1
Registered: October 2012
Junior Member
Hey guys!

I'm trying to integrate ActiveMQ into my Virgo server. Is there a common way to just drop in the jar (or something like that) without writing any line of code? Just out of the box.

Furthermore, it should be configurable. I've seen the karaf example at the activeMQ page (where it creates a XML file and you just modify it). Is there something similar for the virgo server?

Thanks a lot,
Re: ActiveMQ Integration [message #933916 is a reply to message #930481] Fri, 05 October 2012 13:06 Go to previous messageGo to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010


I integrated activemq in Virgo, you just have to make a little bundle containing the amq configuration, here's mine (it just embed a META-INF/spring/activemqconf.xml:
<beans xmlns=""
<osgi-compendium:cm-properties id="jmsConfigProperties" persistent-id="jms-config"/>
<context:property-placeholder properties-ref="jmsConfigProperties"/>
	<amq:broker brokerName="brokerB1" shutdownOnMasterFailure="true"
					<amq:policyEntry queue=">" producerFlowControl="true"
								queuePrefix="DLQ." useQueueForQueueMessages="true" />
			<amq:managementContext createConnector="false" />
			<amq:kahaDB directory="activeMQ/kahadb"
				enableJournalDiskSyncs="false" indexWriteBatchSize="10000"
				indexCacheSize="1000" />
			<amq:loggingBrokerPlugin />
					<amq:memoryUsage limit="420 mb" />
					<amq:storeUsage limit="1 gb" />
					<amq:tempUsage limit="250 mb" />
			<amq:transportConnector name="tcp"
				uri="${transportconnector.uri}" />
	<!-- JMS ConnectionFactory to use, configuring the embedded broker using 
		XML -->
	<amq:connectionFactory id="jmsFactory" brokerURL="${connectionfactory.uri}" />

	<bean id="cachedConnectionFactory"
               <property name="targetConnectionFactory" ref="jmsFactory" />
               <property name="sessionCacheSize" value="3" />
	<osgi:service ref="cachedConnectionFactory"

With this, you can have a in your usr repo:

Then you should be able to reference the amq connectionfaction via service reference (blueprint, spring-dm...).


[Updated on: Fri, 05 October 2012 13:09]

Report message to a moderator

Re: ActiveMQ Integration [message #1000022 is a reply to message #933916] Sun, 13 January 2013 20:05 Go to previous messageGo to next message
Miguel Salinas Gancedo is currently offline Miguel Salinas GancedoFriend
Messages: 8
Registered: October 2012
Junior Member
Hi Charlie,

I was trying to follow your example with Virgo 3.0.2. I create the bundle like you and add the necesary bundles to my virgo instance and create the properties file called and save it in:

/opt/virgo-tomcat-server-3.0.3.RELEASE/repository/usr directory

And i obtaind the error:

... Could not resolve placeholder 'transportconnector.uri'

That you see i cant not recover the properties from the file throw spring. I also save the file in the /opt/virgo-tomcat-server-3.0.3.RELEASE/repository/usr/config directory and the error it's the same.

If I add default values to the properties configuration the system run ok, but if not I obtained the previous error:
<osgi-compendium:cm-properties id="jmsConfigProperties" persistent-id="jms-config">
<prop key="transportconnector.uri">tcp://</prop>
<prop key="connectionfactory.uri">vm://localhost</prop>

Where I must save the properties file inside Virgo?

Best regards.

[Updated on: Sun, 13 January 2013 20:27]

Report message to a moderator

Re: ActiveMQ Integration [message #1000264 is a reply to message #1000022] Mon, 14 January 2013 11:54 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
You need to deploy preferably by referencing it from a plan that you deploy somehow (pickup, admin console, etc.) or by copying it to pickup.
Previous Topic:Virgo automatically stops
Next Topic:ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6
Goto Forum:

Current Time: Tue Jun 19 07:06:19 GMT 2018

Powered by FUDForum. Page generated in 0.01532 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top