10.25.07

Creating a DataSource Object for DBConnection in NetBeans:

Posted in Database at 11:07 pm by vchaithanya

1)First we need to open tomcat administrator. Using

http://localhost:8084/admin/    and login by entering the username and password.

2) If u don’t know the admin username and password.    Goto->  netbeans -> tools-> servermanager ->select Bundled Tomcat -> on right side under Catalina Base shows tomcat base directory.

 Goto TomcatBaseDirectory -> conf -> tomcat-users.xml,  in this file it defines the username and password for admin role.

3) After opening the tomcat administration tool -> select DataSources ->

   Click on Available Actions -> select Create New DataSource ->

   And enter the following fields , I used JDBC driver

    JNDI name  = jdbc/dbcon

     DataSource Url  = jdbc:odbc:cnya

     JDBC Driver Class = sun.jdbc.odbc.JdbcOdbcDriver

    Username = scott

     Password = tiger

 Max. Active Connections = 4

 Max. Idle Connections = 2

 Max. Wait for Connection = 5000

 Click on save -> and click on Commit Changes

This will create the DataSource.

Read the rest of this entry »