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 are some characteristics of interference class?
Give the hierarchy of inputstream and outputstream classes.
Why are data types important?
Is simpledateformat safe to use in the multithreaded program?
Write a program to print fibonacci series up to count 10.
Which command from the jdk compiles a java program?
Can we overload the methods by making them static?
What are the important features of Java 11 release?
What is e java?
When object is created and destroyed?
Should a main method be compulsorily declared in all java classes?
What is difference between c++ and java ?
Why declare Main() inside the class in java ?
Why we go for collections in java?
What is a lambda expression ? What's its use ?