Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


balakrishna
jndi
2 Answer(s)      3 years and 11 months ago
Posted in : JNDI


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

Advertisement
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
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
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
hibernate jndi
In 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 - 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
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
java - Java Beginners
java  JNDI Configuration tomcat using eclipse
cofigurations - Java Beginners
cofigurations  what configurations i have to do for Tomcat5.5 and Eclipse3.x for database connection using JNDI
Explain - LDAP
Explain LDAP  Any one explain about LDAP ? and also explain about JNDI what relation b/w this two
Given a list of methods for a stateful or stateless session bean class, define which of the following operations can be performed from each of those methods: SessionContext interface metho
methods, Java Naming and Directory Interface API (JNDI API) access to java..., UserTransaction methods, Java Naming and Directory Interface API (JNDI API.... JNDI access to java:comp/env
Advance Java
Advance Java  Context ctx = new InitialContext(); if(ctx==null) { throw new RuntimeException("JNDI Context not Found"); } ds=(DataSource)ctx.lookup
mahesh
mahesh  I developed a sessionbean in netbeans IDE..bt ejb-jar.xml is not available in netbeans how can i map jndi name to ejb without ejb-jar.xml. am using bea-weblogic application server. please can anybody help
Building Enterprise Bean Perspective to Allow Access
injection or JNDI lookup. Through Dependency Injection javax.ejb.EJB annotation... : @EJB XYZBean xyzBean; Through JNDI lookup, lookup method... the dependency injection or JNDI lookup. Through Dependency Injection javax.ejb.EJB
Difference between EJB 2 and EJB 3 - EJB
That is the clientClass using the JNDI name looks for appropriate bean and operates. where... for the JNDI name in the appropriate jar..  Hi Friend, Please visit
j2ee - EJB
j2ee  how can u make a call from session Bean of SessionFacade to Entity Bean when ur using persistence logic implemented in Entity Beans. I think inorder to get the home interface obj for first time it will look up in jndi
Unable to connect servet, jsp to oracle 10g database.. Unable to retrieve data..
(); Class.forName( aProps.getProperty("driver") ); String JNDI = aProps.getProperty("JNDI_NAME"); try... = (DataSource) ictx.lookup(JNDI); mCon = ds.getConnection
Java - JMS
the localjndi name is mapped to the remote Que's connectionfactory\Queue jndi name... to the LocalJNDI name (which in turn maps to the remote queue jndi name). The message I
Understanding Data Source
on. DataSource object works with JNDI (Java Naming and Directory interface) naming service so application can use the JNDI API to access
Chapter 10. Message-Driven Bean Component Contract
associated with a message-driven bean by using JNDI. For example.... A client's JNDI name space may be configured to include the JMS Destinations... JNDI access to java:comp/env
Test and debug enterprise components
Client, you must locate it on your server. If you know the JNDI name of your enterprise bean, you may use the JNDI Explorer page to directly type the name. Otherwise, use the graphical view on the JNDI Explorer page to browse
Access container and server services from enterprise components
. JNDI name - jdbc/TitanDS... Finish. You associated a pooled database connection to a JNDI.... Add WebSphere Binding information (the JNDI (Java Naming
How to access Enterprise Beans
or JNDI lookup. Dependency Injection is a Java programming language annotations... the Java EE server managed environment is javax.ejb.EJB. JNDI, Java Naming... components that will be explicitly lookup JNDI provides a global syntax
Writing Deployment Descriptor of Stateless Session Bean
-descriptor> </reference-descriptor> <jndi-name>ShoppingCart</jndi-name> </weblogic-enterprise-bean> <weblogic...-descriptor> </reference-descriptor> <jndi-name>
Spring
that force to use JNDI and the Struts that force to extend Action. Spring promotes
Identify EJB 2.0 container requirements.
(support for row sets only)JNDI 1.2 Standard Extension
Hibernate - Hibernate
Hibernate  Hai this is jagadhish while running a Hibernate application i got the exception like this what is the solution for this plz inform me. INFO: Not binding factory to JNDI, no JNDI name configured Aug 14, 2008 12:06
Given a list of scenarios, identify which will result in an ejbRemove method not being called on a bean instance.
, JNDI exceptions) exception thrown from the instance’s method... and Directory Interface API (JNDI API) access to java:comp/env environment naming
Configure JMS connection factories and destinations
the Java Naming and Directory Interface (JNDI). Some default values... authentication. A name for the connection factory and its JNDI name...: Name - ReservationQueueFactory, JNDI Name - jms/ReservationQueueFactory
C Tutorials
environment through its methods.   JNDI Context Like JDBC (Java Database Connectivity), JNDI is not a service, but a set of interfaces... context that can be accessed using the JNDI API.    Thread
Writing Calculator Stateless Session Bean
;public static final String    JNDI_NAME="...;/reference-descriptor>   <jndi-name>ShoppingCart</jndi-name> </weblogic-enterprise-bean> <weblogic-enterprise
Free JSP, Free EJB and Free Servlets Hosting Servers
;  -XML Support: Cocoon 1.8.2 -Struts -RMI, JMS, JNDI
Developing Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial.
)  Java Naming and Directory Interface (JNDI... and Directory Interface (JNDI) Sun's JNDI API.... With the help of JNDI java application can seamlessly access the heterogeneous
JBoss Application Server
such as database access (JDBC), transactions (JTA), messaging (JTS), naming (JNDI
Integration Libraries
;host" script engines. Java Naming and Directory Interface(JNDI) API
Introduction to POJO (Plain Old Java Object) Programming Model
components. There are no longer need to write the tedious JNDI framework-specific... use @MessageDriven annotation to map the JNDI name.  The Client... object of the @Producer interface from the JNDI. The auto-generated stub
Introduction to POJO (Plain Old Java Object) Programming Model
components. There are no longer need to write the tedious JNDI framework-specific... @MessageDriven annotation to map the JNDI name.  The Client:  To use... of the @Producer interface from the JNDI. The auto-generated stub-object not only
A Message-Driven Bean Example
queues and topics are bound in the JNDI environment and made available to J2EE... resource is mapped to the JNDI name of the destination from which the bean receives... resources for us. The EJB 3.0 API enables us to look up objects in the JNDI
Advertisements
 

 

 

DMCA.com