----- Original Message ----
> From: Bruce Snyder <bruce.sny...@gmail.com>
> To: users@activemq.apache.org
> Sent: Thursday, July 16, 2009 10:54:24 AM
> Subject: Re: Changing the ManagmentContext to point to non-localhost
>
> On Thu, Jul 16, 2009 at 8:21 AM, mkondawrote:
> >
> > Hello All
> >
> > I have changed the managementContext in activemq.xml config to point to a
> > new port:
> >
> >
> >
> > createConnector="true"/>
> >
> >
> > My broker config is:
> >
> >
> > dataDirectory="${activemq.base}/data">
> > ....
> >
> >
> > As you can see, I have added brokerName and useJmx tags so that my serivice
> > url can be exposed to JMX Clients/console.
> >
> > However, when I start up the activemq, I always get the jmxurl being
> > published at localhost (rather than my brokerName or host)
> >
> > INFO ManagementContext- JMX consoles can connect to
> > service:jmx:rmi:///jndi/rmi://localhost:10099/jmxrmi
> >
> > Question: Is there a way that I can create the serviceUrl of the
> > ManagementContext to use my machine name instead of default localhost?
>
> The localhost portion is hard-coded in the ManagementContext class.
> This could certainly be changed, but I have reservations about doing
> this because even a successful resolution of the actual hostname or ip
> address has some associated overhead that could affect the startup
> time. Let alone a resolution that goes awry which could actually
> prevent broker startup. Opinions, thoughts?
>
> Bruce
Doesn't this cause a problem with posix OSes? If you listen on localhost on a
linux machine, it will listen on the loopback interface, which means that you
won't be able to accept remote connections.
I recently had a lot of trouble trying to get remote JMX working on a linux
server (it worked fine locally). After checking my config 15 times, playing
with iptables, and slamming my head on my desk for a while, I gave up and
figured I would come back to it later. It sounds possible (if not likely) that
this was my problem. I'm no system administrator, so let me know if I'm off
base here.
JLuna