os version: windwos2000 serverhostname: mytestdatabase: oracle 9.2.0.1port: 1521table: test (a number (2)) user: systempassword: oracleweblogic version: 7.0.4domain: mydomainserver: myserverport: 7001WL_HOME: d:. / bea / weblogic1 connection configuration pool open weblogic administration console [http: // mytest: 7001 / console] mydomain-> services-> jdbc-> connection pools add a connection poolname: OraThinpoolurl: jdbc: oracle: thin: @mytest: 1521: technetDriver Classname: oracle.jdbc.driver.OracleDriverproperties: user = systempassword: oracletarget: myservertest table name:. dual2 configuration management console weblogic open Data Source [http: // mytest: 7001 / console] mydomain-> services-> jdbc-> Data Source Add a Data Sourcename: OraThinDSJNDI Name: jndi_orathinDSPool Name: OraThinPooltarget: myserver3 test code Context ctx = null; Hashtable ht = new Hashtable (); ht.put (Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); ht.. PUT (Context.Provider_URL, "T3: // mytest: 7001"); try {ctx = new initialContext (ht); javax.sql.datasource DS = (javax.sql.datasource) CTX.lookup ("JNDI_ORATHINDS"); Java.sql.connection conn = ds.getConnection (); statement stmt = conn.createStatement (); string sql = "select a from test"; resultset = stmt.executeQuery (sql); while (rs.next ()) {int i = rs.getInt (1); System.out.println (i);}} catch (Exception e) {e.printStackTrace ();} rs.close (); stmt.close (); conn.close (); 4. The JDBC driver position of the note database should appear in the environment variable classpath. This example is driven to CLASS12.zip at D: / BEA / WebLogic / Server / LIB ClassPath = D: / BEA / WebLogic / Server /LIB/CLASS12.ZIP;%CLASSPATH% modified the classpath in D: /bea/weblogic/server/bin/startwls.cmd to restart WebLogic