dev@glassfish.java.net

Re: JMX Access to the MQ Broker

From: Linda Schneider <Linda.Schneider_at_Sun.COM>
Date: Thu, 09 Jul 2009 17:02:02 -0700

So the broker can run in 3 modes:
      Embedded - runs inside the server
      Local - glassfish starts it
      Remote - administrator starts a standalone broker

Until a few days ago, the broker was only started (in embedded mode)
when a MDB was deployed. That is changing ... "Lazy Loading" support is
about to go in / has gone in (The changes are in on the MQ side but I'm
not 100% sure of the state of integration into glassfish - satish will
know).

Once it is in - connecting to the portmapper port (7676) with anything
should trigger starting the broker if its embedded.

On Local: I "think" (again need satish to confirm) that the broker is
always started (not just when there is an MDB) so you shouldn't have to
worry

On Remote - if may or may not be running (if its not running, you
shouldn't display anything).

What I "think" this means is ... if you connect to 7676 before you do
anything the broker will be started (if its not remote) and after that,
if you get an exception then none of the monitoring should be displayed
(its a down remote broker).

-- Linda

Jason Lee wrote:
> So how would the Admin Console make sure that the broker is started?
> Presumably, we would only do this if someone were to access this part
> of the console, but I would think we'd want to be able to force the
> activation the JMS system if needed.
>
> On Jul 9, 2009, at 5:57 PM, Kedar Mhaswade wrote:
>
>> In the "embedded broker" case (i.e. V2 default for
>> the developer profile), the naming service (which is RMI registry) is
>> shared. In v2, if you just started the domain and connected to host:8686
>> via Jconsole, you'll see a slew of JMS MBeans that are very useful.
>> The MBean domain is: com.sun.messaging.jms.server.
>>
>> The same wouldn't yet show up on v3 either because you will need
>> MDBs/messages in your application or it's not yet activated.
>>
>> -Kedar
>>
>> Linda Schneider wrote:
>>> The instance is started with the server (unless you turn it off) ...
>>> I believe that it is "supposed" to share the glassfish directory
>>> in-process but I'm not 100% sure (and the author of that code no
>>> longer works at sun) ... if you get stuck let me know and I can dig.
>>> If you want to know what URI it is running on, telnet to the broker
>>> and it should tell you.
>>> e.g.
>>> telnet localhost 7676
>>> There are helper methods with the MQ JMX API that can be used to
>>> talk to the portmapper if you want to retrieve the host/port that
>>> way (or you can configure it to start unsing a specific URI)
>>> Jason Lee wrote:
>>>> I'm trying to finish up the port of the JMS support in the Admin
>>>> Console from v2 to v3. The only major functionality left is the
>>>> physical destination management, which is done via JMX directly
>>>> against the broker. Anyone familiar with how that code worked in
>>>> v2 or how it should be in v3 have time to give me a nudge in the
>>>> right direction? For instance, if I can get a connection to the
>>>> MBeanServer for the broker, I can probably take it from there, but
>>>> getting the connection the v2 doesn't appear to be working anymore.
>>>> Additionally, is the MQ instance started with the server, or must
>>>> it be started manually?
>>>>
>>>> Many thanks! :)
>>>>
>>>> <http://www.java.com> * Jason Lee *
>>>> Senior Java Developer
>>>> GlassFish Administration Console
>>>>
>>>> *Sun Microsystems, Inc.*
>>>> Phone x31197/+1 405-343-1964
>>>> Email jasondlee_at_sun.com <mailto:jasondlee_at_sun.com>
>>>> Blog http://blogs.sun.com/jasondlee
>>>> Blog http://blogs.steeplesoft.com
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> <mailto:dev-unsubscribe_at_glassfish.dev.java.net>
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>> <mailto:dev-help_at_glassfish.dev.java.net>
>>
>
> <http://www.java.com> * Jason Lee *
> Senior Java Developer
> GlassFish Administration Console
>
> *Sun Microsystems, Inc.*
> Phone x31197/+1 405-343-1964
> Email jasondlee_at_sun.com <mailto:jasondlee_at_sun.com>
> Blog http://blogs.sun.com/jasondlee
> Blog http://blogs.steeplesoft.com
>
>