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 |
What should I import for arraylist in java?
Why null value is used in string?
Is java is a fully object object oriented language?
What is the method used to get the absolute value of a number?
What is java algorithm?
string is immutable? right every one knows that, my question is it advantage or disadvantage making string immutable?
Is there a way to increase the size of an array after its declaration?
What class is used to implement a Throwable array?
What are void methods?
What is the purpose of using the java bean?
how to create daemon thread in java?
What is the numeric promotion?