SQL> connect scott/tiger SQL> create or replace function helloworld return VARCHAR2 as language java name 'Hello.world () return java.lang.String'; / Function created.
CREATE OR REPLACE PROCEDURE insertAccount(owner IN varchar, bal IN number, newid OUT number) AS LANGUAGE JAVA NAME 'GenPK.insertAccount( java.lang.String [])'; /
在ejbCreate()内调用存储过程
Public AccountPK ejbCreate(String ownerName, int balance) throws CreateException { try { CallableStatement call = conn.prepareCall{ "{call insertAccount(?, ?, ?)}"}; return new AccountPK(accountID); } }