Monday, August 30, 2010

Oracle Packages that include Java

Here's a cheat sheet for including Java stored procedures  in packages.

Write a class:

    public class OracleFoo {
        public static void myproc(int port, String s) throws  Exception {
        }
    }

Compile and Load:

    javac OracleFoo.java
    loadjava  -u scott/tiger OracleFoo.class

Declare a package:

    create or replace package oraclefoo
    as
        procedure myproc(port number, s varchar2)
          as language java name 'OracleFoo.myproc(int, java.lang.String)';
    end;

Call:

    begin
        oracletbslow.myproc(7728,'[1,"a","b1",{}]');
        oracletbslow.myproc(7727,'[1,"a","b2",{}]');
    end;   

Permissions:

    need to set these, double-check notes...

Wednesday, August 25, 2010

Six Keys to Being Excellent at Anything - Tony Schwartz - The Conversation - Harvard Business Review

Six Keys to Being Excellent at Anything - Tony Schwartz - The Conversation - Harvard Business Review:
  1. Pursue what you love.
  2. Do the hardest work first.
  3. Practice intensely
  4. Seek expert feedback, in intermittent doses.
  5. Take regular renewal breaks.
  6. Ritualize practice.