C
Cerveza Mas Fina
Hello All :
I have been asked to write a remote client that needs to get a Oracle
connection object from
a Connection pool on a Sun Application Server 9 system.
I have not found any resources that are specefic to Sun App server and
dont have much
idea about how to do this. This is what I could gather so far .. am I
even going the correct way ?
What sould I put for the INITIAL_CONTEXT_FACTORY & PROVIDER_URL ?
Please have patience if this is a dumb question.
Thanks
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put( Context.PROVIDER_URL, "t3://Server101:8080/" );
// Get Initial Context
InitialContext context = new InitialContext(env);
// Get the reference of the home Object
Object obj = context.lookup("java:comp/env/jdbc/OracleJndi");
DataSource ds = (DataSource)obj;
......
I have been asked to write a remote client that needs to get a Oracle
connection object from
a Connection pool on a Sun Application Server 9 system.
I have not found any resources that are specefic to Sun App server and
dont have much
idea about how to do this. This is what I could gather so far .. am I
even going the correct way ?
What sould I put for the INITIAL_CONTEXT_FACTORY & PROVIDER_URL ?
Please have patience if this is a dumb question.
Thanks
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put( Context.PROVIDER_URL, "t3://Server101:8080/" );
// Get Initial Context
InitialContext context = new InitialContext(env);
// Get the reference of the home Object
Object obj = context.lookup("java:comp/env/jdbc/OracleJndi");
DataSource ds = (DataSource)obj;
......