When you start GlassFish Server, the JMS service is available but is not loaded until it is needed (for example, when you create a JMS resource). Use the jms-ping(1)subcommand to check if the JMS service is running or, if it is not yet running, to start it. If thejms-ping subcommand is unable to contact a built-in JMS service, an error message is displayed.
If you encounter problems, consider the following:
View the GlassFish Server log file, typically located at domain-dir/logs/server.log.
If a the log file indicates that a Message Queue broker did not respond to a message, stop the broker and then restart it.
View the broker log, typically available at as-install/domains/domain1/imq/instances/imqbroker/log/log.txt.
For JMS REMOTE mode, be sure to start Message Queue brokers first, then GlassFish Server.
If all Message Queue brokers are down, it takes 30 minutes for GlassFish Server to go down or up when you are using the default values in JMS. You can change the default values for this timeout. For example:
asadmin set domain1.jms-service.reconnect-interval-in-seconds=5