on 04-01-2009 6:56 PM
Hi Gurus;
Can i get list of JDBC dataSourceNames in java code ?
Anyone knows?
Problem solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please check if the following link helps you:
http://java.sun.com/products/jdbc/faq.html
and
http://www.oop-reserch.com/simple_dao.html
Regards
Chen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for links but they are not answered my question.
I have this code ;
try {
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
javax.naming.NamingEnumeration enm = ctx.list("");
while (enm.hasMore()) {
javax.naming.NameClassPair entry = (javax.naming.NameClassPair)enm.next();
out.println("<br>"+entry.toString());
}
} catch (Exception e) {
out.println(e.toString());
}
but this gives me;
java:comp
this "java:comp" is a directory of JNDI Registry.
JDBC datasource is a subdirectory of JNDI Registry too.
Is there any way to list all JNDI Registry and it's subdirectories?
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.