|
|
Question : Datasources on WebSphere
|
|
I want to use Datasources with WebSphere 3.5. I want to know how this can be accomplished.
1.I went to "WebSPhere Administrator console->Admin DB Driver->DataSources". Thier is one data source already created. I don't know how to create a new datasource(right click 'DataSources' but nothing poped up).
2. i also tried to create datasources in the program
java.util.Properties prop = new java.util.Properties(); prop.put(DataSourceFactory.NAME, "SampleDB"); prop.put(DataSourceFactory.DATASOURCE_CLASS_NAME, "COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource"); prop.put(DataSourceFactory.DESCRIPTION, "My sample datasource"); prop.put("databaseName", "sample");
DataSource ds = DataSourceFactory.getDataSource(prop); DataSourceFactory.bindDataSource(ds);
but i am not able to locate javax.sql.DataSource & COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource.
I am using java 1.3.7. Do i need to download java 1.4.?. My back end is SQL Server 2000.
Can anybody explain how i can use datasource to connect to SQL Server database?.
Thanks in advance.
|
Answer : Datasources on WebSphere
|
|
hi,
go to www.ibm.com/redbooks , here search for a pdf named sg246161.pdf file. this is webphere 3.5 hand book. it is very good. in this check 14th chapter. It contains how to create datasource object and alot more.
u can create more than one datasource. u have to specify a unique name for each datasource.
|
|
|
|
|