dev@glassfish.java.net

Re: possible patch for JmxConnectorServerDriver.java

From: Nandini Ektare <Nandini.Ektare_at_Sun.COM>
Date: Sat, 19 Apr 2008 20:23:00 -0700

Hi Wolfram,

This looks like the issue
https://glassfish.dev.java.net/issues/show_bug.cgi?id=3289

It has been fixed on GF v2. You can instead take that patch on GF.

Regards,
Nandini

Wolfram Rittmeyer wrote:
> To fix issues like the one described here in the following thread
> (http://forums.java.net/jive/thread.jspa?messageID=269859) I have
> added some code to JmxConnectorServerDriver so that the code does not
> use "localhost" for JMX (see the attached patch) if a bind address
> other than "0.0.0.0" is used.
>
> Prior to changing the code I have done a fresh maven checkout etc. And
> the branch used is SJSAS91_FCS_BRANCH. If there is a V2 UR2 planned
> this patch should probably merged into this branch as well.
>
> BTW: I have signed the SCA.
>
>
> Regards,
>
> Wolfram Rittmeyer
>
> ------------------------------------------------------------------------
>
> # This patch file was generated by NetBeans IDE
> # This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
> # It uses platform neutral UTF-8 encoding.
> # Above lines and this line are ignored by the patching process.
> Index: glassfish/jmx-remote/rjmx-impl/src/java/com/sun/enterprise/admin/jmx/remote/server/rmi/JmxConnectorServerDriver.java
> --- glassfish/jmx-remote/rjmx-impl/src/java/com/sun/enterprise/admin/jmx/remote/server/rmi/JmxConnectorServerDriver.java Base (1.9)
> +++ glassfish/jmx-remote/rjmx-impl/src/java/com/sun/enterprise/admin/jmx/remote/server/rmi/JmxConnectorServerDriver.java Locally Modified (Based On 1.9)
> @@ -266,12 +266,20 @@
> //Note that the Connector Server can only be
> //started on the host where this method is called
> if (protocol == RemoteJmxProtocol.RMIJRMP) {
> + if ("0.0.0.0".equals(bindAddress)) {
> this.url = JmxServiceUrlFactory.forRmiWithJndiInAppserver(
> JmxServiceUrlFactory.localhost(), this.port);
> this.jconsoleurl = JmxServiceUrlFactory.forJconsoleOverRmiWithJndiInAppserver(
> JmxServiceUrlFactory.localhost(), this.port);
> }
> + else {
> + this.url = JmxServiceUrlFactory.forRmiWithJndiInAppserver(
> + bindAddress, this.port);
> + this.jconsoleurl = JmxServiceUrlFactory.forJconsoleOverRmiWithJndiInAppserver(
> + bindAddress, this.port);
> }
> + }
> + }
> private void prepare() {
> if (protocol == RemoteJmxProtocol.RMIJRMP) {
> RMIServerSocketFactory rmiregssf = new RMIServerSocketFactory() {
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>