FileDocCategorySizeDatePackage
DarwinsDataDelivery.javaAPI DocExample823Fri Mar 19 21:10:42 GMT 2004None

DarwinsDataDelivery

public class DarwinsDataDelivery extends Object

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

		String driver = "oracle.jdbc.driver.OracleDriver";
		String dbURL = "jdbc:oracle:thin:@server:1521:db570";
		DataSource ds = new DarwinsDataSource(driver, dbURL);
		// Test it out...
		Connection conn = ds.getConnection("student", "student");
		// System.out.println("Connection = " + conn);
		// conn.close();

		// Bind it into JNDI
		System.getProperties().setProperty("java.naming.factory.initial",
			"com.sun.jndi.rmi.registry.RegistryContextFactory");
		System.getProperties().setProperty("java.naming.provider.url",
			"rmi://localhost/");
		new InitialContext().rebind("darwinsys/RainData", ds);