0

We are trying to build test app on WebSphere App Server which would be able to respect changes in WebSphere MQ Queue Connection factory.

Unfortunately we found that after changing port and QMgr name, saving and replicated changes and even after restart of application, then it get MQConnFact.. reference from InitialContext, it is bound to the same UNCHANGED connection factory object, so it does require Server restart to peek up changes.

Is that normal? From my perspective we don't have to restart server and even don't have to restart app in order to get updated object.

And yes, we close session, connection and messageproducer objects. How to peek up updated reference every time we look it up?

Morag Hughson
  • 7,255
  • 15
  • 44
Павел
  • 677
  • 6
  • 21

2 Answers2

0

Unfortunately, WebSphere is caching resources and binding it to JNDI context at startup. From my personal experience only restart ensures that changes in resources are updated.

Maybe a side question: why do you change Queue Connection Factory properties? Do you have QMGrs in cluster? If you have multiple Queue Managers in a cluster, you might use configuration based on CCDT file to distribute load.

Magic Wand
  • 1,572
  • 10
  • 9
  • Thanks for answer. The reason behind our test app as we adopt customer application which uses spring and store conn properties in Db. This app could peek those changed properties withour restart, by refreshing spring context. But we trying to migrate to connections managed by WebSphere, in order to manage and monitor connections by means of app server. – Павел Jul 23 '14 at 09:58
0

If you define a resource reference from your app to the resource in question then the restarting of the application should force the rebinding of the resource into the namespace. Without a resource reference you would need to restart the application server for the resource to be rebound into the namespace.

whitfiea
  • 1,943
  • 10
  • 15
  • I think we tried this way, with reference. It still requires server to restart, since context reference is cached by websphere. We even tried to put special options before getting context, to not cache resources, but this doesn't work either. – Павел Jul 30 '14 at 12:34