FileDocCategorySizeDatePackage
DarwinsDataDelivery.javaAPI DocExample827Sat Jan 13 18:09:50 GMT 2001None

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);