File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which jar file in WAS v5 contains DataSourceFactory

 
Rama Kalicut
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David Hibbs
Ranch Hand
Posts: 374
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic