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
Which container method is used to cause a container to be laid out and redisplayed in java programming?
What is callablestatement? How you can call stored procedure to pass in parameter?
How do you check if two given string are anagrams?
Can we override the static methods?
Explain access specifiers?
What is the exception hierarchy in java?
Will minecraft java be discontinued?
What is the statements?
Why does java have two ways to create child threads? Which way is better?
What is final?
What is method reference in java?
What is the use of coding?
Does garbage collection occur in permanent generation space in jvm?
Explain thread life cycle in java?
Can a string be null?