[ 
https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693610#action_12693610
 ] 

Eric Hubert commented on SYNAPSE-526:
-------------------------------------

Ok, at the moment the functionality will be activated by configuring the 
following properties in synapse.properties:

# JNDI port property used for the JMX naming directory (RMI registry)
# if this port is not configured, the JMX connector will not be started at all 
(preserve current behavior)
synapse.jmx.jndiPort=<any port you like>  # e.g. 1099 is commonly used, but 
could conflict with existing registries
    
# RMI port property used to configure the JMX RMI port
# If this port is not configured, the JMX implementation chooses a dynamic 
port, which is not what you want in a firewalled environment
synapse.jmx.rmiPort=<any port you like) #e.g. 1098

I just kept it this way to be compatible with the existing implementation. I 
would also like to start the JMX connector by default, as I consider the JMX 
support to be a very useful core functionality.

So I will submit a synapse.properties file with both entries commented and 
change the functionality to automatically detect a free port starting at 1099. 
if the properties are set, they override the automatic port. I guess the will 
be the common case for enterprise deployments whereas the default behavior 
should be best suitable for any new user. In any case the URL used to connect 
via JMX will be output.

Does this sound ok? 

We could also use a value like "auto" for synapse.jmx.jndiPort and leave this 
uncommented. If a user wants to complete deactivate this functionality, he 
could simply comment the port, which would otherwise not be possible.

Any thoughts? Other options? I'm free to any suggestions and will then come up 
with an improved patch. I would also work on the configuration of the 
authentification. Maybe I can make use of the new stuff Indika provided for 
datasource password encryption here as well. I will have a look at this.

> Add server connector to make use of existing MBeans
> ---------------------------------------------------
>
>                 Key: SYNAPSE-526
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-526
>             Project: Synapse
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Eric Hubert
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: JmxAdapter.patch
>
>
> Hi,
> currently Synapse does not create a JMX server connector to enable the user 
> to make use of the existing MBeans via JConsole or any other JMX-compliant 
> management solution. The attached patch introduces a small JMXAdapter class 
> to create an RMI registry using a specified JNDI port in synapse.properties 
> (synapse.jmx.jndiPort). Only if this port is specified it will create the 
> registry and start the server connector. If the user additionally specifies a 
> fixed RMI port in synapse.properties (synapse.jmx.rmiPort) instead of using a 
> dynamic RMI port Synapse will use the specified port thus allowing a 
> firewalled setup (you have to open both ports in your firewall).
> The Javadoc of the class explains the connect syntax:
> service:jmx:rmi:///jndi/rmi://<hostname>:<jndiPort>/synapse or 
> service:jmx:rmi://<hostname>:<rmiPort>/jndi/rmi://<hostname>:<jndiPort>/synapse
> This patch shall just demonstrate the basic idea. I'm of course willing to 
> contribute further work on this (including documentation). The best place in 
> the startup and shutdown phase of Synapse should be discussed. I'm going to 
> start a separate discussion on the order of actions in the Synapse startup 
> phase anyway.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to