users@glassfish.java.net

Re: ERROR : Starting a GlassFish-managed broker directly

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Fri, 06 Jan 2012 12:17:05 +0000

On 06/01/2012 11:47, forums_at_java.net wrote:

>
> I am learning EJB 3.1 message-driven bean development with its deployment on
> GlassFish 3.1.1 application server (AS) by means of Eclipse Indigo.

OK. So you are using GlassFish. I therefore recommend you do not use imqbrokerd to start the JMS broker directly but
instead use the JMS broker that is built into GlassFish. This will completely avoid all the complications of broker name.

"asadmin start-domain" will start the GlassFish instance and the embedded broker
"asadmin stop-domain" will stop them both

Unfortunately some of the information in the MQ administration guide is not appropriate when you are using MQ as part of
GlassFish. The general architectural information is valid, but some of the MQ tools and commands are not appropriate and
you should use GlassFish tools and commands instead. In particular, do not use the MQ admin console. If you want to use
a GUI, use the GlassFish administration console instead.

A good place to start is the GlassFish Administration Guide. This contains a section on JMS
http://docs.oracle.com/cd/E18930_01/html/821-2416/abljw.html#scrolltoc

If you're simply trying to learn about JMS and MDBs, I recommend working through the JMS section of the Java EE 6 tutorial
http://docs.oracle.com/javaee/6/tutorial/doc/
which has an example of an MDB
http://docs.oracle.com/javaee/6/tutorial/doc/bnbpk.html

You can download the code for these examples.

Nigel