Hello,
initialContext.listBindings("") returns everything.
I need to know the arguments I need to pass to get:
Thanks again,
Aziz
JNDI is simply a mapping of names (ids) to arbitrary objects. As far as I know you can't directly ask for objects of a certain type. But you have a few options:
- standardise on a naming convention so you can tell from an
object's name what type of object it is
- sub-contexts might be a better alternative to the previous
option - if you put all your Topics in a specific sub-context
then you can list just those objects. If you're using the
SMC's JMS Administered Objects tool, select a node in
the JNDI tree in the left-hand pane, then right-click to get
the 'Create Sub-Context' instruction.
- get everything, then test the resulting objects to determine
the type (e.g. 'obj instanceof javax.jms.Queue',
'obj instanceof javax.jms.ConnectionFactory', etc.)
Thank you Paul for your well-crafted answer.
I have already implemented the 3rd option and I felt that there must be a more elegant way.
The second option looks like the solution I was looking for but this an existing environment that I can't currently modify.
Aziz.