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
Does hashset allow duplicates in java?
What does provide mean construction?
What is the covariant return type?
How do you convert an int to a string in java?
What is the purpose of object oriented programming?
What are the five major types of reference sources?
Can we compare two strings in java?
What are the advantages of exception handling?
What’s the difference between the methods sleep() and wait()?
What is an empty list in java?
What does 0 mean in boolean?
What are the important features of Java 8 release?
What does nullpointerexception mean?
What is java ceil?
What is local variable and instance variable?