You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Laurent CHARTIER <ex...@agora.msa.fr> on 2008/03/19 14:30:54 UTC

RE : JMX monitoring support

I progress!
I have added the -D options and I can run the JConsole.
So now how can I declare my Mbean to be loaded when Synapse starts?

Thank you,

Laurent.
-----Message d'origine-----
De : Asankha C. Perera [mailto:asankha@wso2.com] 
Envoyé : vendredi 14 mars 2008 11:43
À : user@synapse.apache.org
Objet : Re: JMX monitoring support


Laurent
> I can't find any informations about JMX in Synapse 1.1.1 site. Can 
> someone help me? I'd like to declare a Mbean and make it avalaible 
> after Synapse starts.
>   
Sure, we need to improve JMX support and documentation before the next 
release.. if you want to look at the initial JMX support we have with 
Synapse, add  "-Dcom.sun.management.jmxremote" to your synapse.xml's 
last line. e.g:

$JAVA_HOME/bin/java -server -Xms128M -Xmx128M $XDEBUG $PORT $SYNAPSE_XML 
*-Dcom.sun.management.jmxremote* -Dresolve.root=$SYNAPSE_HOME/repository 
-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.pars
ers.XMLGrammarCachingConfiguration 
-Dsynapse.home=$SYNAPSE_HOME 
-Daxis2.xml=$SYNAPSE_HOME/repository/conf/axis2.xml 
-Djava.endorsed.dirs=$SYNAPSE_ENDORSED 
-Djava.io.tmpdir=$SYNAPSE_HOME/work/temp/synapse -classpath 
$SYNAPSE_CLASSPATH org.apache.synapse.SynapseServer $SYNAPSE_HOME/repository

Or if you are using Synapse as a daemon, add it to the wrapper.conf as:
wrapper.java.additional.10=*-Dcom.sun.management.jmxremote

*Now if you run jconsole on the local machine, you can access the 
MBeans. The standard JMX documentation applies

asankha




Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.



RE : RE : RE : JMX monitoring support

Posted by Laurent CHARTIER <ex...@agora.msa.fr>.
Sorry Asankha,
I was wrong.
The MBean Mediator is well loaded when the configuration is loaded. And so
the MBean is available in the JMX console.
I just have to declare a Class mediator alone in the synapse.xml

Thank you.
Laurent.

-----Message d'origine-----
De : Asankha Perera [mailto:asankha.apache@gmail.com] De la part de Asankha
C. Perera
Envoyé : mardi 24 février 2009 13:46
À : user@synapse.apache.org
Objet : Re: RE : RE : JMX monitoring support

Hi Laurent
> My need is to register a MBean on Synapse start-up.
>
> What you proposed to me is a MBean Mediator. The problem is that before it
> is used for the first time in a sequence, this mediator won't be available
> in the JMX console.
>
> Any idea?
>   
Did you implement the ManagedLifecycle interface in your mediator? Can 
you share the code with me?

cheers
asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com





Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.



Re: RE : RE : JMX monitoring support

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Laurent
> My need is to register a MBean on Synapse start-up.
>
> What you proposed to me is a MBean Mediator. The problem is that before it
> is used for the first time in a sequence, this mediator won't be available
> in the JMX console.
>
> Any idea?
>   
Did you implement the ManagedLifecycle interface in your mediator? Can 
you share the code with me?

cheers
asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


RE : RE : JMX monitoring support

Posted by Laurent CHARTIER <ex...@agora.msa.fr>.
Hi Asankha,
So long I let this problem without solution...

My need is to register a MBean on Synapse start-up.

What you proposed to me is a MBean Mediator. The problem is that before it
is used for the first time in a sequence, this mediator won't be available
in the JMX console.

Any idea?

Laurent.


-----Message d'origine-----
De : Asankha C. Perera [mailto:asankha@wso2.com] 
Envoyé : mercredi 19 mars 2008 17:07
À : user@synapse.apache.org
Objet : Re: RE : JMX monitoring support

Hi Laurent
> I progress!
> I have added the -D options and I can run the JConsole.
>   
Cool!
> So now how can I declare my Mbean to be loaded when Synapse starts?
>   
Can you look at the HttpCoreNIOListener:init() method.. if its a 
mediator that needs JMX management, you can make the mediator implement 
ManagedLifecycle interface and register with JMX on its init

asankha




Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.



Re: RE : JMX monitoring support

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Laurent
> I progress!
> I have added the -D options and I can run the JConsole.
>   
Cool!
> So now how can I declare my Mbean to be loaded when Synapse starts?
>   
Can you look at the HttpCoreNIOListener:init() method.. if its a 
mediator that needs JMX management, you can make the mediator implement 
ManagedLifecycle interface and register with JMX on its init

asankha