FileDocCategorySizeDatePackage
OCCIBind.javaAPI DocExample1000Tue Nov 21 14:17:40 GMT 2000None

OCCIBind

public class OCCIBind extends Object

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

  
  Context context = null;
  try {
   Properties properties = new Properties();
    properties.setProperty(
     Context.INITIAL_CONTEXT_FACTORY, 
     "com.sun.jndi.fscontext.RefFSContextFactory");
    properties.setProperty(
     Context.PROVIDER_URL, 
     "file:/JNDI/JDBC");
   context = new InitialContext(properties);
  } 
  catch (NamingException ne) {
   System.err.println(ne.getMessage());
  }

  OracleConnectionPoolDataSource ocpds = 
   new OracleConnectionPoolDataSource();
  ocpds.setDescription("Database");
  ocpds.setDriverType("thin");
  ocpds.setServerName("dssw2k01");
  ocpds.setPortNumber(1521);
  ocpds.setDatabaseName("orcl");
  ocpds.setUser("scott");
  ocpds.setPassword("tiger");

  context.bind(ocpds.getDescription(), ocpds);