What are the steps to do connection pooling in weblogic?
Answer Posted / 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 View All Answers
What are access specifiers in java ?
How do you use compareto?
What is static keyword in java?
What is preparedstatement in java?
I want to re-reach and use an object once it has been garbage collected. How it's possible?
Explain the use of javap tool.
Can you create an object of an abstract class?
What is string buffer?
What is difference between core java and java ee?
Why we override equals() method?
Can an interface have a class?
What are the advantages of compiled language?
Can a constructor have different name than a class name in java?
What is prefix of a string?
What is a ternary operator in java? What is an interface?