Can any one tell or point me to code to list all the jndi entries in a remote machine
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
I know, there are lot of time from last answer, but I needed to list all jdbc datasource available in a context (tomee context).
In my case, I needed more than
list("")
(sadly, this didn't work for me) to reach my goal. I found a naming environment list here:Naming Environment for J2EE Application Components
Having this, I got all available jdbc resources using next code snippet
That's all.
I hope this can helps someone else, as helps me.
I'm using following code (not for production):
It is possible to list all entries of an InitialContext. You can use this snippet:
If you are using an application server, there is usually the option to browse the JNDI tree.
The previous answers didn't give me the "full picture" (on Tomcat7), so I've thrown together the following amalgamation, which converts the JNDI values to a Tree Map (with
toString
values):Usage:
Gives the following output in Tomcat7: