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
What's the base class in java from which all classes are derived?
Can a main method be declared final?
What should I import for arraylist in java?
What is variable and rules of variable?
Why arraylist is not synchronized in java example?
Why parameters should be passed by reference?
What is replaceall in java?
Why do we need autoboxing in java?
What is the biggest integer?
Can java list be null?
What is the old name of java?
Explain the term virtual machine?
What is the use of java?
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?
What is difference between char array and string?