JNDI Lokup for DSN in iPlanet 6.5 App server

Hi ,

I have been trying to implement Connection Pooling in my application using the built-in features of iPlanet App server 6.5 . For the same i have made the following entries:

1. web.xml

<resource-ref>

<description>Ptrade Entry</description>

<res-ref-name>jdbc/ptradeDataSource</res-ref-name>

<res-type>javax.sql.DataSource</res-type>

<res-auth>Container</res-auth>

</resource-ref>

2. ias-web.xml

<resource-ref>

<res-ref-name>jdbc/ptradeDataSource</ref-ref-name>

<jndi-name>jdbc/ptrade/ptradeDB</jndi-name>

</resource-ref>

3. Also my class tries to ge the context using

try {

InitialContext ic = new InitialContext();

ds = (DataSource)ic.lookup("java:comp/env/jdbc/ptradeDataSource");

}

catch (NamingException ne) {

System.out.println("Naming Exception" + ne);

}

Connection dbc = ds.getConnection();

return dbc;

However i am getting an javax.naming.NameNotfoundException: can't locate jdbc/ptradeDataSource.

Could somebody pls tell me what is wrong with my configuration and code?

[1236 byte] By [babe_in_the_woodsa] at [2007-11-26 13:54:21]
# 1
Well, it looks like you haven't actually configured a datasource with that name. You've only configured the use of the datasource were it to exist. I don't know iPlanet, so you'll have to consult the docs to find out how to create the DS.
dcmintera at 2007-7-8 1:32:52 > top of Java-index,Core,Core APIs...