FileDocCategorySizeDatePackage
TestDataSource.javaAPI DocExample590Fri Mar 19 21:09:44 GMT 2004None

TestDataSource

public class TestDataSource extends Object
See if a DataSource exists and is usable.
version
$Id: TestDataSource.java,v 1.3 2004/03/20 03:09:44 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)


		Context ctx = new InitialContext();

		String dsn = argv[0];
		System.out.println("Looking up " + dsn);
		Object o = ctx.lookup(dsn);
		DataSource d = (DataSource)o;

		System.out.println("Getting connection ");
		Connection con = d.getConnection();
		System.out.println("Got it!");