Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


After creating conntinpool in weblogic
how to write the code in programe where i can use that pool
object in the programe connecting to the database
and how to debug programe withou eclipse

Answers were Sorted based on User's Feedback



After creating conntinpool in weblogic how to write the code in programe where i can use that pool..

Answer / penchala

import java.sql.*;
import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

class WLConnection
{


public static void main(String arg[]){
Context ctx = null;
java.util.Hashtable ht = new Hashtable();

ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");

Connection conn = null;

try {
ctx = new InitialContext(ht);
javax.sql.DataSource ds = (javax.sql.DataSource)
ctx.lookup ("jdbc/sample");
conn = ds.getConnection();


}
catch (Exception e) {
// a failure occurred

}
}
}

Is This Answer Correct ?    1 Yes 0 No

After creating conntinpool in weblogic how to write the code in programe where i can use that pool..

Answer / sriram

simple answer........by using web-application compilatiom by
server running

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JDBC Interview Questions

What are the sailent features of JDBC 2.0?

7 Answers  


Does jdbc require oracle client?

0 Answers  


After creating conntinpool in weblogic how to write the code in programe where i can use that pool object in the programe connecting to the database and how to debug programe withou eclipse

2 Answers   Wipro,


What is JDBC Batch Processing and what are it’s benefits?

0 Answers  


What are jdbc and its components?

0 Answers  


What is jdbc and explain jdbc architecture?

0 Answers  


What packages are used by jdbc?

0 Answers  


DB2 Universal claims to support JDBC 2.0, But I can only get JDBC 1.0 functionality. What can I do?

0 Answers  


How can you use preparedstatement in jdbc?

0 Answers  


How do I insert an image file (or other raw data) into a database?

0 Answers  


What is two-phase commit in the database?

0 Answers  


How do you know which driver is connected to a database?

3 Answers  


Categories