What are the steps to do connection pooling in weblogic?



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

Post New Answer

More Core Java Interview Questions

Why are pointers not secure?

0 Answers  


What is indexof?

0 Answers  


How many statements can be created with one connection in jdbc?

4 Answers   Polaris,


Is it possible to specify multiple jndi names when deploying an ejb?

0 Answers  


When will we prefer to use set and list in java and why?

0 Answers  






What are the methods to rectify ambiguities in the interfaces in JAVA?

0 Answers   CGI,


What is a loop java?

0 Answers  


What is string builder in java?

0 Answers  


what are the different non-access specifiers in java?

5 Answers  


What is onClassLoader in java?

5 Answers   Cap Gemini,


What is a lock or purpose of locks in java?

0 Answers  


Explain the Propertie sof class?

0 Answers  


Categories