Hi, I'm trying to create a datsource from a class file. With WAS v4, I know that DataSourceFacotry is in ujc.jar. But, I need it for WAS v5. My java code::::::::::::: // Create a properties file for the DataSource 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");
// Obtain a DataSource from the factory DataSource ds = DataSourceFactory.getDataSource(prop);
// Bind the DataSource into JNDI DataSourceFactory.bindDataSource(ds); Thanks kalicut
Doing a search of the v5 infocenter (http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp) for DataSourceFactory comes up with exactly zero results. Searching the jars in the lib folder for it comes up with exactly zero results. Hence, I suspect this capability no longer exists in WAS 5. However, a JMX extension is provided. So I think maybe a better question is whether your app really needs to dynamically create data sources. Can you simply configure them initially and connect to them...?
"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
subject: Which jar file in WAS v5 contains DataSourceFactory