What are the steps to do connection pooling in weblogic?



What are the steps to do connection pooling in weblogic?..

Answer / gajendra

We can implement connection pooling in weblogic as follows.
1. OPen weblogic console.on the top right hand side corner
of the window click on services tab.
2.Expand it and select JDBC.
3.Create a connection pool
4.Create a DataSource.
5.Create a JNDI.

In the programs make use of the following code to get the
connection from ConnectionPool

Context ic=null;
DataSource ds;
Connection con=null;
Hashtable ht=new Hashtable();
ht.put
(Context.INITIAL_CONTEXT_FACTORY,"Weblogic.jndi.WLInitialCon
textFactory");
ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
ic=new InitialContext(ht);
ds=(DataSource)ic.lookup("jndi name given in weblogic");
con=ds.getConnection();

Is This Answer Correct ?    20 Yes 3 No

Post New Answer

More Core Java Interview Questions

State the difference between creating string as new () and literal.

0 Answers  


Which access specifier can be used with class ?

0 Answers  


Can a lock be acquired on a class in java programming?

0 Answers  


What is audio clip interface? Name few methods of it ?

1 Answers  


What is the use of conditional statement?

0 Answers  






How large is a boolean?

0 Answers  


What are the types of sockets in java?

0 Answers  


Why do we need array in java?

0 Answers  


Difference between string s= new string (); and string s = "abv";?

0 Answers   Cap Gemini,


Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?

0 Answers  


How to perform merge sort in java?

0 Answers  


Difference between Application and Applet ?

4 Answers   Wipro,


Categories