Results 1 to 2 of 2

Thread: JMS Question

  1. #1
    RickJava is offline Member
    Join Date
    May 2013
    Rep Power

    Default JMS Question

    Hi Everyone,

    I apologies if I am posting it in a wrong thread, I was not able to locate the exact thread.

    I am implementing a java process to post messages to the JMS queue. I need some advise.

    Scenario :

    I have to post for eg 10 messages to the JMS queue ( its in a loop based on some business condition )
    I used service locator design pattern to cache the JNDI lookup for connection factory and queue object since I didnt want to keep creating object from context lookup.

    Is there a better way ? I mean do I need rather use IBM-BND-WEB.XMI ?? Does ibm-bnd-web-xmi caches the objects ?

    Can someone please share me a code snippet.

    Appreciate your response.


  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Rep Power

    Default Re: JMS Question

    So you must be talking about some external client that uses the JNDI Context class to lookup and bind to a REMOTE connection factory, right?

    If so - does your solution work? Is it readable? If the answer to both is yes, then your solution is just fine. The last thing you need to be doing is second-guessing yourself, then you'll be asking this question for every decision you make! The trouble with doing that is that you will always get multiple conflicting answers, since deciding what is "better" is highly subjective.
    Last edited by gimbal2; 11-18-2013 at 06:26 PM.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 2
    Last Post: 05-25-2012, 04:00 PM
  2. Java Question [Beginner Question]
    By joker760 in forum New To Java
    Replies: 3
    Last Post: 12-13-2011, 05:01 PM
  3. question posted by indissa: library question.
    By Fubarable in forum New To Java
    Replies: 2
    Last Post: 11-18-2011, 02:14 AM
  4. Question concerning question marks and colons
    By jim01 in forum New To Java
    Replies: 17
    Last Post: 01-14-2011, 01:05 AM
  5. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts