FileDocCategorySizeDatePackage
PolicyTestExternalConnection.javaAPI DocExample614Mon Oct 30 19:10:26 GMT 2000None

PolicyTestExternalConnection

public class PolicyTestExternalConnection extends Object

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

  DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
  Connection conn = DriverManager.getConnection(
    "jdbc:oracle:thin:dssw2k01:1521:orcl", "scott", "tiger");
  CallableStatement cstmt = conn.prepareCall(
   "{call sys.dbms_java.grant_permission" + 
   "('SCOTT','java.net.SocketPermission','dssnt01:1024-','connect,resolve')}");
  long rslt = cstmt.executeUpdate();
  if (rslt==0) 
   System.out.println("OK");
  cstmt.close();
  conn.close();