• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Java Full Freek
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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 ....
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15715
73
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Java Full Freek", welcome to JavaRanch.

Please read your private messages for an administrative matter from JavaRanch.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!