You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by cmoulliard <cm...@gmail.com> on 2008/10/20 15:29:14 UTC

ActiveMq - AJAX - JMX & Camel

Hi,

1) I would like to know if it is possible to activate JMX with the
MessageListenerServlet used by AJAX ? In the web.xml configuration file, the
only two parameters that we can configurate are the following : 

	<!-- context config -->
	<context-param>
		<param-name>org.apache.activemq.brokerURL</param-name>
		<param-value>tcp://localhost?useJmx=true</param-value>
		<description>The URL of the Message Broker to connect to
		</description>
	</context-param>

	<context-param>
		<param-name>org.apache.activemq.embeddedBroker
		</param-name>
		<param-value>true</param-value>
		<description>Whether we should include an embedded broker or
			not</description>
	</context-param>

Remarks : 
- As you can see, I have added useJmx=true to the brokerURL but the jxm
extensions cannot be reached by jconsole.
- I have also added a Camelcontext (with JMX activated) with my
AJAX/ActiveMq project but inside the jconsole, we only see the Camelcontext
but not the broker

2) Can I use ActiveMQ/Ajax in comination with Camel to perform the following
:

a) AJAX - ActiveMqServlet is used to allow a web browser client to have
access to messages published on the bus
b) Camel routing is used to publish messages on the bus. ActiveMq Servlet
and Camel will use the same bus. Should this one by of type vm://, tcp:// ?

KR, 

Charles Moulliard

-----
Enterprise Architect

Xpectis
12, route d'Esch
L-1470 Luxembourg

Phone +352 25 10 70 470
Mobile +352 621 45 36 22

e-mail : cmoulliard@xpectis.com
web site :  www.xpectis.com www.xpectis.com 
My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/ActiveMq---AJAX---JMX---Camel-tp20067498p20067498.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMq - AJAX - JMX & Camel

Posted by Dejan Bosanac <de...@ttmsolutions.com>.
Hi Charles,

> 1) I would like to know if it is possible to activate JMX with the
> MessageListenerServlet used by AJAX ? In the web.xml configuration file, the
> only two parameters that we can configurate are the following : 
>
> 	<!-- context config -->
> 	<context-param>
> 		<param-name>org.apache.activemq.brokerURL</param-name>
> 		<param-value>tcp://localhost?useJmx=true</param-value>
> 		<description>The URL of the Message Broker to connect to
> 		</description>
> 	</context-param>
>
> 	<context-param>
> 		<param-name>org.apache.activemq.embeddedBroker
> 		</param-name>
> 		<param-value>true</param-value>
> 		<description>Whether we should include an embedded broker or
> 			not</description>
> 	</context-param>
>
> Remarks : 
> - As you can see, I have added useJmx=true to the brokerURL but the jxm
> extensions cannot be reached by jconsole.
> - I have also added a Camelcontext (with JMX activated) with my
> AJAX/ActiveMq project but inside the jconsole, we only see the Camelcontext
> but not the broker
>   

the brokerUrl parameter that you set in the web.xml is just the
connection url the servlet will use to connect to the broker, so it
cannot be used to turn broker JMX on/off. You should take a look at your
broker settings (probably activemq.xml) and try setting JMX there.

> 2) Can I use ActiveMQ/Ajax in comination with Camel to perform the following
> :
>
> a) AJAX - ActiveMqServlet is used to allow a web browser client to have
> access to messages published on the bus
> b) Camel routing is used to publish messages on the bus. ActiveMq Servlet
> and Camel will use the same bus. Should this one by of type vm://, tcp:// ?
>   

If all your clients (camel and servlet in this case) are in the same JVM
then it is better to use VM transport


Cheers

-- 
Dejan Bosanac


http://www.ttmsolutions.com - get a free ActiveMQ user guide

ActiveMQ in Action - http://www.manning.com/snyder/
Scripting in Java - http://www.scriptinginjava.net