This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to check jndi bind/unbind status?  RSS feed

Valdemar Kabozya
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking for way of checking bind status of object and appropriate JNDI name.

For example, I've got some ldap jms queue name: "/TheRootContext/SomeSubContext/SOME.QUEUE.NAME:queue"

I need to check that appropriate queue exists and it is binded with passed name.

What will be the correct way to check "bind status"?

I see such algorithm:

  • Perform jndi lookup to ensure that provided name exists.

  • %I don't know what to do next%, but suggest something like checking that:

  • ===
    Another way, suggested here:
    is to use listBindings method, passing to it parent context name: and checking what interested binding present in returned NamingEnumeration. But this is actually the same as previous method. This way something like this should be done:

    So, what is the correct way?

    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!