473,386 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Find a resource using JNDI in a Web Application.

dmjpro
2,476 2GB
When i do ....

Expand|Select|Wrap|Line Numbers
  1. HashMap props = new HashMap();
  2. props.put(Context.INITIAL_CONTEXT_FACTORY,"FactoryClass");
  3. Context ctx = new InitialContext(props);
  4.  
Here it is obvious that the proper factory class is given.
But when it is not given then what happens?
From where the context obtained?

Now in Web Application we define the resources in context.xml(for tomcat).
So to obtain a context we simply call the zero argument constructor and then simply by lookup service we get the resources bound to names. So here how the Context service provider obtained without setting the properties value.
Jun 12 '09 #1
0 1467

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: bj7lewis | last post by:
I am working on a project I want to add a few files as resource to access(copy them to FS and use) at runtime. So far in VS.NET IDE, I Add Files to the project and set its Build Action to...
11
by: Alan T | last post by:
I added a resource file into my project, to store the caption of buttons and labels.. How do I make use of this resource file to dynamically assign to the buttons and labels ?
5
by: Pallavi Kadam | last post by:
Tell Me Fullform of Jndl Tellme Jndi Is Releated To Topics Jndi Imp role In j2ee
1
dmjpro
by: dmjpro | last post by:
how do i do JNDI program in local machine.... plze give me JNDI programming free tutorial with examples .... plz help me .... thanx
0
by: sajithamol | last post by:
<env-entry> <env-entry-name>com/speedRate</env-entry-name> <env-entry-type>java.lang.Integer<env-entry-type> < env-entry-value>10</env-entry-value> </env-entry>
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
by: choukse | last post by:
Hi All, I am trying to bind to ADAM instance with a windows user through JNDI and it keeps failing. My ADAM and AD is running on same Windows 2k3 server. But, through LDP I am able to bind with...
9
dmjpro
by: dmjpro | last post by:
I thought that when the connection gets closed then all resources get closed . I also included the ResultSet and Statement ;) . But if the Statement closed then only ResultSet closed. But now i got...
1
vitmca
by: vitmca | last post by:
How to configure jndi name in Jboss. I am using sql server 2005.
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.