What are the steps to do connection pooling in weblogic?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the base class in java from which all classes are derived?

745


Can a main method be declared final?

588


What should I import for arraylist in java?

510


What is variable and rules of variable?

520


Why arraylist is not synchronized in java example?

471






Why parameters should be passed by reference?

502


What is replaceall in java?

545


Why do we need autoboxing in java?

520


What is the biggest integer?

554


Can java list be null?

553


What is the old name of java?

506


Explain the term virtual machine?

592


What is the use of java?

528


What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?

599


What is difference between char array and string?

528