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 |
Why are pointers not secure?
What is indexof?
How many statements can be created with one connection in jdbc?
Is it possible to specify multiple jndi names when deploying an ejb?
When will we prefer to use set and list in java and why?
What are the methods to rectify ambiguities in the interfaces in JAVA?
What is a loop java?
What is string builder in java?
what are the different non-access specifiers in java?
What is onClassLoader in java?
What is a lock or purpose of locks in java?
Explain the Propertie sof class?