After creating conntinpool in weblogic
how to write the code in programe where i can use that pool
object in the programe connecting to the database
and how to debug programe withou eclipse
Answers were Sorted based on User's Feedback
Answer / penchala
import java.sql.*;
import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
class WLConnection
{
public static void main(String arg[]){
Context ctx = null;
java.util.Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
Connection conn = null;
try {
ctx = new InitialContext(ht);
javax.sql.DataSource ds = (javax.sql.DataSource)
ctx.lookup ("jdbc/sample");
conn = ds.getConnection();
}
catch (Exception e) {
// a failure occurred
}
}
}
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sriram
simple answer........by using web-application compilatiom by
server running
Is This Answer Correct ? | 0 Yes | 0 No |
How is database middleware used to access legacy databases?
How to move the cursor in scrollable resultset ?
RowSetInternal caller and returns void. What can I do in the readData method?
How to know howmuch data is truncated?
Which jdbc driver is the fastest driver?
What is the use of JDBC DriverManager class?
What is an escape syntax?
What is url in jdbc connection?
What should be done for auto generating primary key id in a table ?
What are the considerations for deciding on transaction boundaries?
Explain how to make updates to the updatable resultsets.
how can we connect to db without using getConnection() method