Hello Megha...
It is very easy..
the thing u want to do is
first log in sun admin console
http://localhost:4848 then.. give user name and passwd
then go to the path like this
Resources -> JDBC -> Connection Pool
first you have to create the connection pool then only u can use it as a JDBC Resource.. ok
now.. click the new button in the connection pool
type like this
name : test
resource type : java.sql.datasource
database vendor : oracle
click next ->
datasource class name = oracle.jdbc.pool.OracleDataSource (this will be default)
click next ->
in the next page..
give following property:
username : scott
pwd : tiget
url :jdbc

racle:thin:@<ip address>:<port number>:<database name>
egs is like this
url = jdbc

racle:thin:@172.16.0.4:1521

racle (ok)
then click finish..
click ping!! to test the connection
if ping succeeded!! then connection is ok
if showing some error!!
then u have to download the thin driver for oracle from
oracle website
the file name will be class12.zip
download that file.. and save it in
<Appserver Path>/domain/domain1/lib/
then u go to the admin console path...
click the Application Server from the left menu..
go to JVM Settings
and then click the Path settings
there u can see the text area for Classpath Suffix:
in that text area..
u have to give the path.. of the thin driver
in my system i give like this
C:\Sun\AppServer\domains\domain1\lib\classes12.zip
click save!!
again go to the connection pool.. and click ping...
it will be successful..
then go to the JDBC Resource!!
and click new button!!
give the jndi name : jdbc/test
the pool name will be in the combo
and give description!!
click ok..
now.. it is ready for the database programming..
try this out...
all the best
