You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Eric Hubert (JIRA)" <ji...@apache.org> on 2009/03/28 20:56:50 UTC

[jira] Created: (SYNAPSE-526) Add server connector to make use of existing MBeans

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


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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Enhanced JMX-support for Synapse

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Attachment: jmx_and_security.patch

> Enhanced JMX-support for Synapse
> --------------------------------
>
>                 Key: SYNAPSE-526
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-526
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Eric Hubert
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: jmx_and_security.patch
>
>
> Hi,
> currently it is only possible to use Java's "out-of-the-Box JMX solution" configured via system properties and/or property files which is sufficient for many cases.
> Anyway there are the following advantages of using the according Remote API to create, configure and deploy the management agent (server connector) programatically:
> 1) easier configuration for average users
> 2) exporting RMI server's remote objects over a certain port to allow passage through a firewall (very important for enterprise deployments), possibility to configure a specific network interface (also sometimes important for enterprise deployments in multi-homed systems 
> 3) possibility to use a custom JMXAuthenticator to handle own credential configuration (including use of Secret-API to encrypt passwords in plain text files if required/prefered over setting os permissions accordingly.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Attachment: JmxAdapter.patch

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693690#action_12693690 ] 

Andreas Veithen commented on SYNAPSE-526:
-----------------------------------------

OK, now I better understand the added value. Thanks for your explanations!

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Enhanced JMX-support for Synapse

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Attachment:     (was: JmxAdapter.patch)

> Enhanced JMX-support for Synapse
> --------------------------------
>
>                 Key: SYNAPSE-526
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-526
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Eric Hubert
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: jmx_and_security.patch
>
>
> Hi,
> currently it is only possible to use Java's "out-of-the-Box JMX solution" configured via system properties and/or property files which is sufficient for many cases.
> Anyway there are the following advantages of using the according Remote API to create, configure and deploy the management agent (server connector) programatically:
> 1) easier configuration for average users
> 2) exporting RMI server's remote objects over a certain port to allow passage through a firewall (very important for enterprise deployments), possibility to configure a specific network interface (also sometimes important for enterprise deployments in multi-homed systems 
> 3) possibility to use a custom JMXAuthenticator to handle own credential configuration (including use of Secret-API to encrypt passwords in plain text files if required/prefered over setting os permissions accordingly.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-526) Enhanced JMX-support for Synapse

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asankha C. Perera resolved SYNAPSE-526.
---------------------------------------

    Resolution: Fixed
      Assignee: Asankha C. Perera

Applied patch, Thanks Eric!

> Enhanced JMX-support for Synapse
> --------------------------------
>
>                 Key: SYNAPSE-526
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-526
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Eric Hubert
>            Assignee: Asankha C. Perera
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: jmx_and_security.patch
>
>
> Hi,
> currently it is only possible to use Java's "out-of-the-Box JMX solution" configured via system properties and/or property files which is sufficient for many cases.
> Anyway there are the following advantages of using the according Remote API to create, configure and deploy the management agent (server connector) programatically:
> 1) easier configuration for average users
> 2) exporting RMI server's remote objects over a certain port to allow passage through a firewall (very important for enterprise deployments), possibility to configure a specific network interface (also sometimes important for enterprise deployments in multi-homed systems 
> 3) possibility to use a custom JMXAuthenticator to handle own credential configuration (including use of Secret-API to encrypt passwords in plain text files if required/prefered over setting os permissions accordingly.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693585#action_12693585 ] 

Asankha C. Perera commented on SYNAPSE-526:
-------------------------------------------

Hi Eric

The patch fails against the current trunk.. could you clarify and update the patch

thanks
asankha

asankha@asankha:~/code/synapse/modules/core$ patch -p0 --dry-run < /tmp/JmxAdapter.patch 
(Stripping trailing CRs from patch.)
patching file src/main/java/org/apache/synapse/Axis2SynapseController.java
Hunk #1 FAILED at 23.
Hunk #2 FAILED at 51.
Hunk #3 FAILED at 74.
Hunk #4 FAILED at 154.
Hunk #5 FAILED at 260.
Hunk #6 FAILED at 292.
6 out of 6 hunks FAILED -- saving rejects to file src/main/java/org/apache/synapse/Axis2SynapseController.java.rej
(Stripping trailing CRs from patch.)
patching file src/main/java/org/apache/synapse/SynapseConstants.java
(Stripping trailing CRs from patch.)
patching file src/main/java/org/apache/synapse/JmxAdapter.java


> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693614#action_12693614 ] 

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

Hi Andreas,

thanks for you feedback, which is of course highly appreciated.

You are absolutely right that the usage of the "out-of-the-Box Management" solution configured via system properties and or property files is sufficient for many cases.
Anyway I see the following advantages of using the according Remote API to create, configure and deploy the management agent programatically:
1) easier configuration for average users
2) exporting RMI server's remote objects over a certain port to allow passage through a firewall (very important for enterprise deployments), possibility to configure a specific network interface (also sometimes important for enterprise deployments in multi-homed systems

Whereas 1) may be arguable, I'm not aware of any other option to achieve 2).

Please have a look at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html for further details!

Thanks,
   Eric



> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693612#action_12693612 ] 

Andreas Veithen commented on SYNAPSE-526:
-----------------------------------------

JMX remote access can be configured entirely using a couple of system properties and a few simple configuration files.

Example (including authentication):

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8004
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.ssl=false
-Djava.security.auth.login.config=/etc/synapse/jaas.config
-Dcom.sun.management.jmxremote.access.file=/etc/synapse/jmxremote.access
-Dcom.sun.management.jmxremote.login.config=myconfig

What additional features do we get by creating the JMX connector using code inside Synapse?

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693601#action_12693601 ] 

Asankha C. Perera commented on SYNAPSE-526:
-------------------------------------------

Hi Eric

I typically use "svn diff > file.patch" since that handles full paths to files and new files well.

The changes looks good.. I would also like the default config values/samples to be included into the synapse.properties so that its easier for users to look for it and configure it. It would also be nice to have this started by default and an INFO level log to state the JMX URL like to connect to, even if nothing is explicitly configured. For the port, you could start on a suitable default and find something which is available

thanks
asankha

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
    [ 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Attachment: JmxAdapter.patch

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Attachment:     (was: JmxAdapter.patch)

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Attachment:     (was: JmxAdapter.patch)

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Enhanced JMX-support for Synapse

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Component/s: Core
    Description: 
Hi,

currently it is only possible to use Java's "out-of-the-Box JMX solution" configured via system properties and/or property files which is sufficient for many cases.
Anyway there are the following advantages of using the according Remote API to create, configure and deploy the management agent (server connector) programatically:
1) easier configuration for average users
2) exporting RMI server's remote objects over a certain port to allow passage through a firewall (very important for enterprise deployments), possibility to configure a specific network interface (also sometimes important for enterprise deployments in multi-homed systems 
3) possibility to use a custom JMXAuthenticator to handle own credential configuration (including use of Secret-API to encrypt passwords in plain text files if required/prefered over setting os permissions accordingly.

  was:
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.

        Summary: Enhanced JMX-support for Synapse  (was: Add server connector to make use of existing MBeans)

Hi,

according to the feedback received so far I tried to improve the provided patch to cover the following concerns:
- start server connector with default configuration using automatic JNDI port detection (as suggested by Asankha)
- possibility to overwrite JNDI port with any fixed port
- possbility to also set RMI port (to support firewalled environments)
- start JMX server connector early, but report connect details at the end of startup
- enhancement of security implementation to support JBoss AS encryption 
  (possibility to use same encrypted passwords for datasource or JMX passwords or any other passwords as in JBoss)
- integration of security API to encrypt JMX passwords
- providing synapse.properties with default configuration and examples for configuration

The patch is rather comprehensive and although I tried to avoid touching too many files, I still added and changed quite a lot of code with this new patch. So I'll ask all developers to do some review.
Regarding the secret changes I would very much appreciate if Indika could have a glance on my changes, but of course any other developer is also invited. ;-)
Once those changes are committed I would like to work on unit test coverage improvements in this area as there is currently almost nothing.

Thanks a lot in advance!






> Enhanced JMX-support for Synapse
> --------------------------------
>
>                 Key: SYNAPSE-526
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-526
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Eric Hubert
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: jmx_and_security.patch
>
>
> Hi,
> currently it is only possible to use Java's "out-of-the-Box JMX solution" configured via system properties and/or property files which is sufficient for many cases.
> Anyway there are the following advantages of using the according Remote API to create, configure and deploy the management agent (server connector) programatically:
> 1) easier configuration for average users
> 2) exporting RMI server's remote objects over a certain port to allow passage through a firewall (very important for enterprise deployments), possibility to configure a specific network interface (also sometimes important for enterprise deployments in multi-homed systems 
> 3) possibility to use a custom JMXAuthenticator to handle own credential configuration (including use of Secret-API to encrypt passwords in plain text files if required/prefered over setting os permissions accordingly.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Hubert updated SYNAPSE-526:
--------------------------------

    Attachment: JmxAdapter.patch

Sorry. I changed from the subversive to the subclipse plugin which seems to use a different patch root by default. I guess this was causing the problems. I hope that this patch will work now without problems.

> 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, 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-526) Add server connector to make use of existing MBeans

Posted by "Eric Hubert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693693#action_12693693 ] 

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

You are welcome - should have added a bit more explanations right from the beginning. ;-)

> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org