ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » SOLVED: Weblogic, JMS and BIND_ON_OPEN

Post new topic  Reply to topic
 SOLVED: Weblogic, JMS and BIND_ON_OPEN « View previous topic :: View next topic » 
Author Message
jefflowrey
PostPosted: Fri Aug 25, 2006 6:33 am    Post subject: SOLVED: Weblogic, JMS and BIND_ON_OPEN Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's a web logic application that is using JMS to produce messages. These messages are being given to a gateway qmgr in an MQ cluster.

The messages appear to all be going to one qmgr in the cluster - so I'm suspicious that the application has specified BIND_ON_OPEN. The application has built JMS definitions that point to QAliases on the gateway qmgr. The QAliases have BIND_NOT_FIXED.

I know that the WebLogic server is pointing to a bindings file, presumably produced by JMS Admin. I haven't seen the scripts that are fed to JMS Admin to produce the bindings file.

As I recall, the only way that JMS allows you to set BIND_ON_OPEN is if you specify a queue manager name on the Queue Destination. This should not be the case - that issue was already addressed (and the aliases would have caused messages to fail, anyway).

If I can get my hands on the JMS definitions, what should I be looking for?

Is there something different with WebLogic than other JMS application servers in this respect?
_________________
I am *not* the model of the modern major general.


Last edited by jefflowrey on Wed Aug 30, 2006 9:48 am; edited 2 times in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 25, 2006 2:45 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Jeff you need to get hold of the .bindings file and check the JNDI definition of the gateway queues.
The bind on open or bind not fixed on the queue manager have little meaning if they have been superseeded in the JNDI layer. If you want them to behave as specified on the qmgr make sure the definition is set to as queue default.


Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Aug 26, 2006 5:49 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

FJ -
So you're saying that I should try and read the bindings file? Or the input file to JMSAdmin that creates the bindings file?

And you're saying that there is an explicit option for BIND_ON_OPEN or not in JMSAdmin definition? Which one? I looked in the Using Java manual and didn't see a particular property for this on a QCF or QUEUE destination.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Aug 26, 2006 6:31 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

jefflowrey wrote:
FJ -
So you're saying that I should try and read the bindings file? Or the input file to JMSAdmin that creates the bindings file?

And you're saying that there is an explicit option for BIND_ON_OPEN or not in JMSAdmin definition? Which one? I looked in the Using Java manual and didn't see a particular property for this on a QCF or QUEUE destination.


You need to use JMSAdmin to read the contents of the .bindings file.
You need as well to double check if the JNDI admin in Weblogic overwrites some attributes (I don't expect it to... but you never know).

Default setting for bind on open (don't know the exact name the Using java should have it somewhere) should be QDEF or as defined on the queue. But it could be anything else. I believe (from memory) that there is a drop down in WAS when you define the Destination.... So I am assuming that there is a way to set it in JMSAdmin. You can create the queue definition in JMSAdmin without specifying all the attributes but when you read it back you will see additional attributes that were set by the program (JMSAdmin) and maybe defaulted to a value you did not expect.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Aug 26, 2006 7:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
(don't know the exact name the Using java should have it somewhere)


Well, that's the thing. I didn't find it.

And, again, QDEF is "BIND_NOT_FIXED". So unless there's a specific property for this, then it's some combination of other properties that result in a BIND_ON_OPEN option.

And my last memories were that the combination of properties was "Specify a queue manager name on the Queue Destination", and this hasn't been done as far as I know.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Aug 26, 2006 9:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

The other thing this archeology should reveal is the name of the queue really used. You might think it is the right queue but it could be some alias queue or any combination resolving into this queue. JNDI has 3 levels of indirection there:
  1. The bindings for the queue in the .bindings file
  2. the bindings for weblogic
  3. the resource reference bindings (J2EE)

I don't know if this is still valid for V6 but I remember that the only way you got the right behavior in JMS was to use a cluster Alias and have the qmgr resolve it. This would garantee the load balancing as per cluster alias resolution. So you might try it. The same thing is necessary when the message enters the cluster from a remote qmgr over multiple hops.

A few more things that might influence JMS behavior:

  • using a defined sender (i.e. creating the sender with the queue) I would expect this to behave as bindings fixed
  • using an anonymous sender (You need to pass the destination(queue) on the send method. I would expect this to behave as bindings not fixed or maybe as qdef
  • whether you use the same destination object on the send method or acquire it again and again for each send
  • whether the connection has been started or not when you call the send method. I have no idea if the behavior there would be any different. To be tested...


Hope this narrows somewhat the field.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Aug 26, 2006 1:05 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

In fact, we are using QALIASes that point to QCLUSTERs.

And I'm quite sure that the name of the queue being used is the name of the QALIAS. I personally went through this a few times with the person who was configuring the bindings. I said "These are the names you need to use, right here. This list". There will be a gorilla of shame for the person who configured this if they used some other name.

I don't quite understand what you're saying about using a defined sender. You mean rather than calling the "send" method on the Queue?

This means that it might require a coding fix to resolve?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Aug 26, 2006 2:18 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

You have 2 ways of creating a sender
  • defined sender : Session.createSender(Destination)
  • anonymous sender: Session.createSender(null)
When calling the send method on a defined sender you don't specify the destination as it is implicit. When using an anonymous sender you have to pass the Destination on the send method.

JMS does some strange things the first time you use the destination like fill in a qmgr name by default if there is none in the JNDI. This is why my guess is if you don't want to change any of the code set a cluster alias on the queue in JNDI:
qmgr=clusteralias queue=myqueue. This can then resolve to the clustered queue/aliasq.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Aug 26, 2006 3:26 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

OH.

A cluster alias.

Hrm. Okay. Annoying.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 30, 2006 9:53 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There was nothing in the JMS configuration that specified a BIND_ON_OPEN.

This was resolved by creating a cluster alias - more specifically a remote queue that had no rname or rqmname values and that specified SYSTEM.CLUSTER.TRANSMIT.QUEUE
Code:
def qr(CLUSTER.ALIAS) rname('') rqmname('') xmitq('SYSTEM.CLUSTER.TRANSMIT.QUEUE')

And then putting the remote queue name into the Queue Manager name field of the Queue Destination.
Code:
def q(JMS.QUEUE.DEST) queue(QUEUE.ALIAS) qmanager(CLUSTER.ALIAS)

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 30, 2006 2:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

jefflowrey wrote:
There was nothing in the JMS configuration that specified a BIND_ON_OPEN.

This was resolved by creating a cluster alias - more specifically a remote queue that had no rname or rqmname values and that specified SYSTEM.CLUSTER.TRANSMIT.QUEUE
Code:
def qr(CLUSTER.ALIAS) rname('') rqmname('') xmitq('SYSTEM.CLUSTER.TRANSMIT.QUEUE')

And then putting the remote queue name into the Queue Manager name field of the Queue Destination.
Code:
def q(JMS.QUEUE.DEST) queue(QUEUE.ALIAS) qmanager(CLUSTER.ALIAS)


Jeff for my cluster aliases I usually don't even specify an xmitq. I let the current qmgr (in the cluster) resolve it.
Code:
def qr(CLUSTER.ALIAS) rname('') rqmname('')
An xmitq gets only specified it the sending qmgr is not in the cluster. Then we specify the xmitq of the channel to the gateway...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Aug 30, 2006 2:49 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It certainly works this way.

It might work without it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » SOLVED: Weblogic, JMS and BIND_ON_OPEN
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.