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 |
write a progam hashmap & hashtable?
What is the gregoriancalendar class in java programming?
Difference between prefix and postfix forms of the ++operator?
Why hashmap is used in java?
Write a program to search a number in the given list of numbers.
What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?
What is the use of parse function in java?
Define inheritance?
What is Connection pooling? Explain Pros and Cons?
How to use string tokenizer class.
What are constants and how to create constants in java?
What is a void return type?