users@glassfish.java.net

Re: Questionsa about having more than one MQ for one glassfish

From: legolas wood <legolas.w_at_gmail.com>
Date: Fri, 20 Apr 2007 18:24:54 +0430

glassfish_at_javadesktop.org wrote:
> When you say two separate MQ , are you referring to 2 separate brokers instances of open mq (that is present in glassfish) ? please let me know if understood this correctly
>
> You can start standalone (open mq) broker instances using GFHOME/imq/bin/imqbrokerd command, this will start a standalone MQ broker instance, of course the lifecycle of this will not be controlled by glassfish and you need to manage this, an instance of glassfish is capable of controlling the lifecycle of only one broker, the one that is configured as default_JMS_host in the JMS service configuration.
>
> However, applications deployed in glassfish can connect to this standalone broker, if you configure your connection factories used by the application (asadmin create-jms-resource) with the addreslist (and other properties) of this broker instance.
>
> An Open MQ jms instance can be integrated with glassfish using one of the following integration modes,
>
> EMBEDDED : This means that the lifecycle (start and stop) of the broker instance (default_jms_host) is controlled by glassfish and the broker is started in the same process as that of the application server.
>
> LOCAL: This means that the lifecycle of the broker instance (default_jms_host) is controlled by glassfish and the broker is started in a separate process.
>
> REMOTE : The broker is started and managed externally and glassfish will only try and connect to it (does not control the start/stop) during glassfish startup.
>
> if you have any specific queries please post them.
>

Thank you very much for reply.

By your reply and my research i understand that we can have multiple
broker for one instance of Open MQ, this brokers facilitate
communication of our connection factories and .. with real Open MQ instance.

Also I deduced that if we use Local integration mode we can achieve
better performance because application server and MQ are in two separate
process, is it correct?

I saw MQ Scheme and MQ Service field can be configured in glassfish
admin console under "Application Server > Configuration > Java
Message Service" what is their use?
specially that they are somehow unfamiliar,

For example : [/hostName/][:/port/][//serviceName/] , I can not
understand the serviceName here, what is its role?



Here in "Application Server > Configuration > Java Message Service
> JMS Hosts" page we can define our standalone JMS host and glassfish
will start/stop it (from its own open MQ folder)

And in this page if we define a new host that is our remote machine then
we should configure "Application Server > Configuration > Java
Message Service" to use our host and set it to be remote.

But changing the JMS host is not an option because we can not use
embedded JMS host for our regular low load queu.
So we need to somehow create some connection factories to connect to the
remote MQ instead of changing the default JMS host.


here this question come:
How i can define this kind of connection factories?
You mentioned that I can but you did not give me more details, can you
please explain about addressList and other properties?


The reason that i thought about a separate MQ is that numbe of r
messages that are going to reside in one of our queue is a big number
and they can stay there for a long time

I thought that if we use our main application server MQ it will
downgrade the performance.

So I thought that we install a version of Open MQ on another machine and
let it handle the queue, is it a correct way to reduce load from
application server .


Imagine that i go with separate installation of Open MQ now I have some
questions:
-How I should configure the connection factories and destinations?
-How I can make my queue or topics to be durable in remote JMS
installation that is not default jms service of Glassfish application
server.? (My messages stay safe if MQ crashed)

Thanks.