how to generate dsnless connectivity in j2ee



how to generate dsnless connectivity in j2ee..

Answer / Anjali Chaudhary

To achieve datasource-less (DSN-less) connectivity in Java 2 Enterprise Edition (J2EE), you can use the Java Naming and Directory Interface (JNDI) API. Here's a brief example of how to configure and access a database using JNDI:

1. Define the resource in your deployment descriptor (web.xml or application.xml).

2. Write code to look up the data source from JNDI context, typically in a utility class.

3. Use the data source object to create a connection and perform database operations as needed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

What is the meaning of .(dot) in .NET framework?

1 Answers   HCL,


In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?

1 Answers  


write a sql qwery which include joining of two tables 4 marks mainframe

1 Answers  


what is technical system, business system, logical system in sap pi7.0

1 Answers   IBM,


cgi stands for

2 Answers   CGI,


Why multiple inheritance is removed in java?

4 Answers   TCS,


can any one suggestion me present which course(except java,.net) has huge demand in the market?

1 Answers  


Hi can you please help for the following. I have a ASP.Net web page I want to print the whole page how is it possible? I want It in ASP also.Please send me the solutions dipankar.hazari@gmail.com . Thanks in advance.

1 Answers   Philips,


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number

1 Answers   Amazon,


what is the difference between an OS(operating system) and Framework?

1 Answers  


SAS using companies in INDIA

29 Answers   Bank Of America, Cap Gemini, Hyundai, IBM, KO, Sristek, TCS, Wipro, WNS,


what is the work of 1tier,2tier,&ntier? Plz Explain it!

1 Answers  


Categories