Can I use JMX on an embedded broker without TCP/IP?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I use JMX on an embedded broker without TCP/IP?

Marc Boorshtein
I have a system that uses activemq 5.8 as an embedded message queue (using
KahaDB).  I'd like to expose some basic management functions via JMX but I
don't want to open a tcp/ip port.  Can I craft a JMX URL similar to how I
create a connection factory (ActiveMQConnectionFactory cf = new
ActiveMQConnectionFactory("vm://localhost/local");) so that I don't have
any open ports?

Thanks
Marc
Reply | Threaded
Open this post in threaded view
|

Re: Can I use JMX on an embedded broker without TCP/IP?

Matt Pavlovich-2
Marc-

That’s mostly a Java VM deal.  Google around, but there are ways to get a handle to the ManagementFactory within memory. I believe you’d have to play around with the startup parameters to enable the Management Bean, but not enable the TCP/IP port.

http://docs.oracle.com/javase/7/docs/api/java/lang/management/ManagementFactory.html

-Matt

On Sep 4, 2014, at 3:50 PM, Marc Boorshtein <[hidden email]> wrote:

> I have a system that uses activemq 5.8 as an embedded message queue (using
> KahaDB).  I'd like to expose some basic management functions via JMX but I
> don't want to open a tcp/ip port.  Can I craft a JMX URL similar to how I
> create a connection factory (ActiveMQConnectionFactory cf = new
> ActiveMQConnectionFactory("vm://localhost/local");) so that I don't have
> any open ports?
>
> Thanks
> Marc

Reply | Threaded
Open this post in threaded view
|

Re: Can I use JMX on an embedded broker without TCP/IP?

Chris Odom
Opening a tcp/ip port and associating that to the JMX registry allows for
JMX remote access. if you are not concerned with remote access the JMX
console can access the local JMX instance as long as you are logged into
that box.

Chris O.

*Chris Odom | Sr Consultant | Media Driver*
512.799.0270 | [hidden email]
810 Hester's Crossing, Suite 165, Round Rock, TX 78681

On Mon, Sep 8, 2014 at 11:24 AM, Matt Pavlovich <[hidden email]> wrote:

> Marc-
>
> That’s mostly a Java VM deal.  Google around, but there are ways to get a
> handle to the ManagementFactory within memory. I believe you’d have to play
> around with the startup parameters to enable the Management Bean, but not
> enable the TCP/IP port.
>
>
> http://docs.oracle.com/javase/7/docs/api/java/lang/management/ManagementFactory.html
>
> -Matt
>
> On Sep 4, 2014, at 3:50 PM, Marc Boorshtein <[hidden email]> wrote:
>
> > I have a system that uses activemq 5.8 as an embedded message queue
> (using
> > KahaDB).  I'd like to expose some basic management functions via JMX but
> I
> > don't want to open a tcp/ip port.  Can I craft a JMX URL similar to how I
> > create a connection factory (ActiveMQConnectionFactory cf = new
> > ActiveMQConnectionFactory("vm://localhost/local");) so that I don't have
> > any open ports?
> >
> > Thanks
> > Marc
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can I use JMX on an embedded broker without TCP/IP?

Marc Boorshtein
I was able to do this using the BrokerFacade object, works perfectly.

Thanks
Marc

On Mon, Sep 8, 2014 at 4:20 PM, Chris Odom <[hidden email]>
wrote:

> Opening a tcp/ip port and associating that to the JMX registry allows for
> JMX remote access. if you are not concerned with remote access the JMX
> console can access the local JMX instance as long as you are logged into
> that box.
>
> Chris O.
>
> *Chris Odom | Sr Consultant | Media Driver*
> 512.799.0270 | [hidden email]
> 810 Hester's Crossing, Suite 165, Round Rock, TX 78681
>
> On Mon, Sep 8, 2014 at 11:24 AM, Matt Pavlovich <[hidden email]>
> wrote:
>
> > Marc-
> >
> > That’s mostly a Java VM deal.  Google around, but there are ways to get a
> > handle to the ManagementFactory within memory. I believe you’d have to
> play
> > around with the startup parameters to enable the Management Bean, but not
> > enable the TCP/IP port.
> >
> >
> >
> http://docs.oracle.com/javase/7/docs/api/java/lang/management/ManagementFactory.html
> >
> > -Matt
> >
> > On Sep 4, 2014, at 3:50 PM, Marc Boorshtein <[hidden email]>
> wrote:
> >
> > > I have a system that uses activemq 5.8 as an embedded message queue
> > (using
> > > KahaDB).  I'd like to expose some basic management functions via JMX
> but
> > I
> > > don't want to open a tcp/ip port.  Can I craft a JMX URL similar to
> how I
> > > create a connection factory (ActiveMQConnectionFactory cf = new
> > > ActiveMQConnectionFactory("vm://localhost/local");) so that I don't
> have
> > > any open ports?
> > >
> > > Thanks
> > > Marc
> >
> >
>