C
Cerveza Mas Fina
Hello All,
I have been asked to write a client that uses a Oracle Connecton
object from a connection pool set up
on a Sun App Server 9. I have found quite a few resources for Weblogic
but none for Sun App Server
can someone help me ?
I am a newbie so, please do have patience If I have everything fubar-
ed
This is what I got so far ...
....
....
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put( Context.PROVIDER_URL, "http://ServerName:8080/" );
// Get Initial Context
InitialContext context = new InitialContext();
Object obj = context.lookup("java:comp/env/jdbc/SampleJndi");
DataSource ds = (DataSource)obj;
conn = ds.getConnection();
I have been asked to write a client that uses a Oracle Connecton
object from a connection pool set up
on a Sun App Server 9. I have found quite a few resources for Weblogic
but none for Sun App Server
can someone help me ?
I am a newbie so, please do have patience If I have everything fubar-
ed
This is what I got so far ...
....
....
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put( Context.PROVIDER_URL, "http://ServerName:8080/" );
// Get Initial Context
InitialContext context = new InitialContext();
Object obj = context.lookup("java:comp/env/jdbc/SampleJndi");
DataSource ds = (DataSource)obj;
conn = ds.getConnection();