users@glassfish.java.net

Re: MDB clientId in MQ cluster

From: JMcL <jmclsubs_at_gmail.com>
Date: Mon, 20 Oct 2008 09:55:33 -0700 (PDT)

Thanks Ismael, that seems to be exactly what I'm looking for, but I've one
remaining problem.

The MDB is persisting on authenticating as guest, no matter what I do. I've
progressed to the point where I've configured a connection factory (via the
admin console) with a username/password. This works with a standalone
publisher to the extent that an exception is thrown when the connection
factory is looked up by the client and the authentication between factory
and broker fails.

I've created a topic connection factory "jms/CustomerTopicFactory", with
"UserName"="mquser" and "Password"="mqpasswd" as properties on the
connection factory, and its associated connector pool, and a topic
"jms/CustomerTopic". In the MDB, mappedName is "jms/CustomerTopic", and
clientId as "${u}CustomerTopic" in an ActivationConfigProperty annotation.
When I look at durable subscribers in imqadmin, the MDB is always listed
with clientId "${u:guest}CustomerTopic", not as "${u:mquser}CustomerTopic",
which is what I'd expect, so I still get a clash when deploying the same EAR
on multiple servers.

I'm sure I'm missing something trivial, but can't see what. As I write this,
I realise there's a gap in my understanding of how a given topic (subscribed
to by the MDB) is related to the connection factory, where the credentials
are configured (I did say I was a newbie!). Searching the web would indicate
that sun-ejb-jar.xml has an <mdb-connection-factory/> element, which would
seem to be the missing link, but I can't see how to make the link via
annotations, or via the admin console. Do I need to add sun-ejb-jar.xml to
my project, or is there some other way to acheive this?

Regards,

John


Ismael Juma wrote:
>
> Hi,
>
>
> JMcL wrote:
>>
>> Is there any way to have a GF instance prepend some instance identifier
>> to the clientId to avoid this, or if not what is the recommended
>> solution?
>>
>
> See the "Client Identifier" header in:
>
> http://docs.sun.com/app/docs/doc/820-4916/aeogu?a=view
>
> Hope it helps,
> Ismael
>

-- 
View this message in context: http://www.nabble.com/MDB-clientId-in-MQ-cluster-tp20015748p20074059.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.