can u please tell me about jndi, what purpose we use jndi, is it like jdbc,hibernate?
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 - JNDIJNDI - Whats the use of
jndi? Whats the use of
jndi? can we change the
jndi according to our needs
jndi - JNDIjndi 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 - JNDIJNDI 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 - JNDIJava 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 - JNDIJava 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
Application Server - JNDIApplication 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 hibernate jndiIn this section, you will learn about configuring hibernate to connect to database via
JNDI datasource
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
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
EJB JNDI LOOK UP PROBLEM - EJBEJB
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
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