• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Need to Get a Specific JMS Queue from the objectPool ( GenericKeyedObjectPool )

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I want to pick a specific JMS Queue from the exsisting Publisher Pool.

The Pool is being configure based on the DestinationSystems ( busibess destnations systems) of the messages and the message priority ( HIGH/NORM )

this is how I confirgure the pool beans in my applicationContext.xml

this is how i borrow an object from the pool generally :-

for one destinationSystem i have multiple queues.
for a special business case I need to send modification on my business object to the same Queue ( destinationName ) as I first time the new trade data was sent to.

I can think of three ways of doing it :-

1. keep borrowing objects untill i find the one i want.

The cons of this one seem that it doesn't confirm that i will ever get that perticular object from borrowObject() and then the loo will keep running infinitely

2. Not use the pool and simply create a new JMSPublisher instance for that Queue by setting JMSParameters. -- Doesn't sound advisable coz we are not using the already exsisting instance of that queue which is in the pool.

3. Create a new pool using key that takes the current criteria ( prioroty & destination system) plus destinationName. meaning create a new pool for only that perticular queue -- again seems not so convincing coz i feel there is nosenese in making a pool for only one Queue and again we will not be ustilising the Q instance already available in the pool.

Let me know your comments on my ideas and wuld be more than happy if anyone has any other way out of this.

would really appriciate a quick advise ....
Java Cowboy
Posts: 16084
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Java Full Freek", welcome to JavaRanch.

Please read your private messages for an administrative matter from JavaRanch.
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic