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

What is a map in java?

0 Answers  


What is a return in java?

0 Answers  


Difference between Superclass and Subclass?

7 Answers  


How many arguments can be passed to main ()?

0 Answers  


Explain, java is compatible with all servers but not all browsers?

0 Answers  


What is Java Classloader?

1 Answers   Phantom Technologies,


I have a Arraylist object, it has duplecate values also. Now question is i want delete duplecate data in that objet with out using Set?

8 Answers   Aricent,


What is a function easy definition?

0 Answers  


What does flag mean in java?

0 Answers  


What is collection class in java? List down its methods and interfaces.

0 Answers  


What is ternary operator?

0 Answers  


How to read and write image from a file ?

0 Answers  


Categories