Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 148ac4b

Browse files
committed
Updated the Basic Samples Readme
1 parent f3f2215 commit 148ac4b

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Rem JavaStoredProcSample.sql
2+
Rem
3+
Rem Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
4+
Rem
5+
Rem NAME
6+
Rem JavaStoredProcSample.sql
7+
Rem
8+
Rem DESCRIPTION
9+
Rem This SQL script is for creating a wrapper for a java stored procedure;
10+
REm then calls it and displays the output.
11+
12+
REM
13+
REM Wrapper (a.k.a. Call Spec) for invoking JavaStoredProcSample.getEmpCountByDept(int)
14+
REM
15+
16+
CREATE OR REPLACE FUNCTION GET_EMP_COUNT_BY_DEPT (dept_no NUMBER)
17+
RETURN NUMBER AS LANGUAGE JAVA
18+
NAME 'JavaStoredProcSample.getEmpCountByDept(int) return int';
19+
/
20+
21+
REM
22+
REM Enable the output of GET_EMP_COUNT_BY_DEPT() then invoke it.
23+
REM
24+
25+
set echo on
26+
set serveroutput on size 5000
27+
call dbms_java.set_output (5000);
28+
29+
VARIABLE v NUMBER;
30+
CALL GET_EMP_COUNT_BY_DEPT(20) INTO :v;
31+
PRINT v
32+

‎java/jdbc/BasicSamples/Readme.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ but, will hit error when connecting as these are dummy values.
4949
* **UCPMaxConnReuse.java**: Shows how applications use the MaxConnectionReuseTime and MaxConnectionReuseCount features of UCP.
5050
* **UCPMultiUsers.java**: Shows how JDBC applications use UCPP to pool connections for different users.
5151
* **UCPTimeouts.java**: Shows key connection timeout features of UCP such as ConnectionWaitTimeout, InactiveConnectionTimeout, TimeToLiveConnectionTimeout, and AbandonedConnectionTimeout.
52+
* **JavaStoredProcSample.java**: Shows a basic Java stored procedure.
53+
* **JavaStoredProcSample.sql**: Shows how to create a wrapper for a Java stored procedure and execute it.
5254

5355

5456

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /