jndi

jndi

can u please tell me about jndi, what purpose we use jndi, is it like jdbc,hibernate?
View Answers

October 4, 2010 at 8:25 PM

Hi,

The Java Naming and Directory Interface (JNDI) is provides the API for accessing the multiple naming and directory services. This API enables the programmers to store and retrieve the java objects of any types.

The JNDI api also enables the Java programmers to access existing naming and directory services, such as LDAP, NDS, DNS, and NIS(YP).

Thanks

April 5, 2011 at 11:47 AM

hi, jndi is an api which provides a connection object to the programmer . by using jndi we can get the connection and the connection and given to the server. actually server maintain a connections which will call it a connectionpooling mechnisam. this type connection use jdbc to access the connection. we no need to write the Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection(url,username,password); this logic we just configure the following structure

if it is apache server:

Context context=new InitialContext();

DataSource datasouce=(DataSource)context.lookUp("java:comp/env/JndiName");

Connection con=datasource.getConnection()

it will provide the connection

if it is weblogic server

Context context=new InitialConntext()

ht.put(Context.INITIALCONTEXTFACTORY, "weblogic.jndi.WLInitialContextFactory");

ht.put(Context.PROVIDER_URL, "t3://localhost:7001");

DataSource datasouce=(DataSource)context.lookUp(ht);

Connection con=datasource.getConnection() it will provide the Connection object

and also one more answer the question it is like jdbc,hibernate jdbc uses the jdni, which provide a connection Hibernate is orm tool .hibernate is internaly use the jdbc api which will genarate the querys,prepate the connection object s









Related Tutorials/Questions & Answers:
JNDI - JNDI
JNDI - Whats the use of jndi?  Whats the use of jndi? can we change the jndi according to our needs
jndi - JNDI
jndi  can u please tell me about jndi, what purpose we use jndi... (JNDI) is provides the API for accessing the multiple naming and directory... of any types. The JNDI api also enables the Java programmers to access existing
Advertisements
JNDI - JNDI
JNDI  Explain JNDI in detail?  Hi friend, JNDI (Java Naming and Directory Interface) enables Java platform-based applications... application programming interface (API) set, JNDI makes it possible for developers
Java - JNDI
Java  What is jndi and where it is exactly used?  Hi Friend, Please visit the following link: http://www.roseindia.net/help/java/c/jndi-context.shtml http://www.roseindia.net/help/java/i/jndi.shtml Hope
Java - JNDI
Java  What is JNDI name & why we use this  Hi friend, 1)JNDI(Java Naming and Directory Interface) is part of the Java platform. 2..., JNDI, LDAP, Active Directory System Level -> File System (DOS, NTFS, etc
Version of simple-jndi>simple-jndi dependency
List of Version of simple-jndi>simple-jndi dependency
JNDI names in netbeans
JNDI names in netbeans  how to create a JNDI names in netbeans
JNDI Settings in EJB3.0 - EJB
JNDI Settings in EJB3.0  Dear frieds, How to setup & use JNDI in ejb3.0 Johns Abraham
Artifacts of simple-jndi
List of Artifacts of simple-jndi maven depenency
Maven Repository/Dependency: simple-jndi | simple-jndi
Maven Repository/Dependency of Group ID simple-jndi and Artifact ID simple-jndi. Latest version of simple-jndi:simple-jndi dependencies. # Version Release Date 1 0.8.1
Application Server - JNDI
Application Server  How can we create Domain in Weblogic9.1 application server and also how can we create jdbc connection pooling by using oraclethin driver and how can we configure it to jndi
Maven Dependency simple-jndi >> 0.10
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.10 in your project
Maven Dependency simple-jndi >> 0.11
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.11 in your project
Maven Dependency simple-jndi >> 0.11.1
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.11.1 in your project
Maven Dependency simple-jndi >> 0.11.2
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.11.2 in your project
Maven Dependency simple-jndi >> 0.11.3
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.11.3 in your project
Maven Dependency simple-jndi >> 0.11.4
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.11.4 in your project
Maven Dependency simple-jndi >> 0.11.4.1
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.11.4.1 in your project
Maven Dependency simple-jndi >> 0.4
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.4 in your project
Maven Dependency simple-jndi >> 0.5
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.5 in your project
Maven Dependency simple-jndi >> 0.6
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.6 in your project
Maven Dependency simple-jndi >> 0.7
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.7 in your project
Maven Dependency simple-jndi >> 0.7-dev-1
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.7-dev-1 in your project
Maven Dependency simple-jndi >> 0.8
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.8 in your project
Maven Dependency simple-jndi >> 0.8.1
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.8.1 in your project
Maven Dependency simple-jndi >> 0.9
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.9 in your project
Maven Dependency simple-jndi >> 0.9.1
You should include the dependency code given in this page to add Maven Dependency of simple-jndi >> simple-jndi version0.9.1 in your project
hibernate jndi
In this section, you will learn about configuring hibernate to connect to database via JNDI datasource
Version of tmporb>tmporb-ns-jndi dependency
List of Version of tmporb>tmporb-ns-jndi dependency
Version of wsrf>wsrf-jndi-config dependency
List of Version of wsrf>wsrf-jndi-config dependency
Version of com.nervepoint>identity4j-active-directory-jndi dependency
List of Version of com.nervepoint>identity4j-active-directory-jndi dependency
Version of com.nervepoint>identity4j-ldap-directory-jndi dependency
List of Version of com.nervepoint>identity4j-ldap-directory-jndi dependency
JNDI Context
JNDI Context        Like JDBC (Java Database Connectivity), JNDI is not a service, but a set... an environment-naming context that can be accessed using the JNDI API. It also
Version of wsrf>wsrf-jndi-config-src dependency
List of Version of wsrf>wsrf-jndi-config-src dependency
Registering DataSource with JNDI
; } Registering The DataSource With JNDI Java Naming Directory Interface (JNDI) Java Naming Directory Interface (JNDI) is an API of java technology which... using Java Object Model for java applications. With the name of JNDI java
Maven Dependency wsrf-jndi-config >> 1.0
You should include the dependency code given in this page to add Maven Dependency of wsrf >> wsrf-jndi-config version1.0 in your project
Maven Dependency identity4j-ldap-directory-jndi >> 1.0.1
You should include the dependency code given in this page to add Maven Dependency of com.nervepoint >> identity4j-ldap-directory-jndi version1.0.1 in your project
Maven Dependency tmporb-ns-jndi >> 1.0
You should include the dependency code given in this page to add Maven Dependency of tmporb >> tmporb-ns-jndi version1.0 in your project
Maven Dependency identity4j-active-directory-jndi >> 1.0.1
You should include the dependency code given in this page to add Maven Dependency of com.nervepoint >> identity4j-active-directory-jndi version1.0.1 in your project
EJB JNDI LOOK UP PROBLEM - EJB
EJB JNDI LOOK UP PROBLEM  Hi, I am using jboss4.2 and created a sessionbean using EJB3 but while running client code I am finding NoInitialContextException claname not set in enviornment properties
sockets - JNDI
connection - JNDI
java - JNDI
java - JNDI
Maven Repository/Dependency: tmporb | tmporb-ns-jndi
Maven Repository/Dependency of Group ID tmporb and Artifact ID tmporb-ns-jndi. Latest version of tmporb:tmporb-ns-jndi dependencies. # Version Release Date You can read more at: Maven
Maven Repository/Dependency: wsrf | wsrf-jndi-config
Maven Repository/Dependency of Group ID wsrf and Artifact ID wsrf-jndi-config. Latest version of wsrf:wsrf-jndi-config dependencies. # Version Release Date 1 1.0 22
Maven Repository/Dependency: com.nervepoint | identity4j-active-directory-jndi
Maven Repository/Dependency of Group ID com.nervepoint and Artifact ID identity4j-active-directory-jndi. Latest version of com.nervepoint:identity4j-active-directory-jndi dependencies. # Version Release Date
Maven Repository/Dependency: com.nervepoint | identity4j-ldap-directory-jndi
Maven Repository/Dependency of Group ID com.nervepoint and Artifact ID identity4j-ldap-directory-jndi. Latest version of com.nervepoint:identity4j-ldap-directory-jndi dependencies. # Version Release Date
Maven Dependency wsrf-jndi-config-src >> 1.0
You should include the dependency code given in this page to add Maven Dependency of wsrf >> wsrf-jndi-config-src version1.0 in your project
Java Naming and Directory Interface (JNDI)
Java Naming and Directory Interface (JNDI)       The Java Naming and Directory Interface (JNDI... and objects via a name. JNDI is independent of the underlying implementation

Ads