Skip to content

Commit 38c4273

Browse files
author
Nirmala Sundarappa
committed
Merge branch 'master' into update
2 parents 0a60d81 + c90e7ca commit 38c4273

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+5013
-221
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributing to oracle-db-examples
2+
3+
*Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.*
4+
5+
Pull requests can be made under
6+
[The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html)
7+
(OCA).
8+
9+
For pull requests to be accepted into oracle-db-examples, the bottom of
10+
your commit message must have the following line using your name and
11+
e-mail address as it appears in the OCA Signatories list.
12+
13+
```
14+
Signed-off-by: Your Name <you@example.org>
15+
```
16+
17+
This can be automatically added to pull requests by committing with:
18+
19+
```
20+
git commit --signoff
21+
````
22+
23+
Only pull requests from committers that can be verified as having
24+
signed the OCA can be accepted.
25+

README.md

Lines changed: 1 addition & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Apache License, Version 2.0 (the "License.")
2626

2727
You may obtain a copy of the License at
2828
http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is
29-
also reproduced below.
29+
also reproduced in [LICENSE.md](./LICENSE.md)
3030

3131
Unless required by applicable law or agreed to in writing, software
3232
distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,208 +35,3 @@ implied.
3535

3636
See the License for the specific language governing permissions and
3737
limitations under the License.
38-
39-
40-
```
41-
Apache License
42-
Version 2.0, January 2004
43-
http://www.apache.org/licenses/
44-
45-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
46-
47-
1. Definitions.
48-
49-
"License" shall mean the terms and conditions for use, reproduction,
50-
and distribution as defined by Sections 1 through 9 of this document.
51-
52-
"Licensor" shall mean the copyright owner or entity authorized by
53-
the copyright owner that is granting the License.
54-
55-
"Legal Entity" shall mean the union of the acting entity and all
56-
other entities that control, are controlled by, or are under common
57-
control with that entity. For the purposes of this definition,
58-
"control" means (i) the power, direct or indirect, to cause the
59-
direction or management of such entity, whether by contract or
60-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
61-
outstanding shares, or (iii) beneficial ownership of such entity.
62-
63-
"You" (or "Your") shall mean an individual or Legal Entity
64-
exercising permissions granted by this License.
65-
66-
"Source" form shall mean the preferred form for making modifications,
67-
including but not limited to software source code, documentation
68-
source, and configuration files.
69-
70-
"Object" form shall mean any form resulting from mechanical
71-
transformation or translation of a Source form, including but
72-
not limited to compiled object code, generated documentation,
73-
and conversions to other media types.
74-
75-
"Work" shall mean the work of authorship, whether in Source or
76-
Object form, made available under the License, as indicated by a
77-
copyright notice that is included in or attached to the work
78-
(an example is provided in the Appendix below).
79-
80-
"Derivative Works" shall mean any work, whether in Source or Object
81-
form, that is based on (or derived from) the Work and for which the
82-
editorial revisions, annotations, elaborations, or other modifications
83-
represent, as a whole, an original work of authorship. For the purposes
84-
of this License, Derivative Works shall not include works that remain
85-
separable from, or merely link (or bind by name) to the interfaces of,
86-
the Work and Derivative Works thereof.
87-
88-
"Contribution" shall mean any work of authorship, including
89-
the original version of the Work and any modifications or additions
90-
to that Work or Derivative Works thereof, that is intentionally
91-
submitted to Licensor for inclusion in the Work by the copyright owner
92-
or by an individual or Legal Entity authorized to submit on behalf of
93-
the copyright owner. For the purposes of this definition, "submitted"
94-
means any form of electronic, verbal, or written communication sent
95-
to the Licensor or its representatives, including but not limited to
96-
communication on electronic mailing lists, source code control systems,
97-
and issue tracking systems that are managed by, or on behalf of, the
98-
Licensor for the purpose of discussing and improving the Work, but
99-
excluding communication that is conspicuously marked or otherwise
100-
designated in writing by the copyright owner as "Not a Contribution."
101-
102-
"Contributor" shall mean Licensor and any individual or Legal Entity
103-
on behalf of whom a Contribution has been received by Licensor and
104-
subsequently incorporated within the Work.
105-
106-
2. Grant of Copyright License. Subject to the terms and conditions of
107-
this License, each Contributor hereby grants to You a perpetual,
108-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
109-
copyright license to reproduce, prepare Derivative Works of,
110-
publicly display, publicly perform, sublicense, and distribute the
111-
Work and such Derivative Works in Source or Object form.
112-
113-
3. Grant of Patent License. Subject to the terms and conditions of
114-
this License, each Contributor hereby grants to You a perpetual,
115-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
116-
(except as stated in this section) patent license to make, have made,
117-
use, offer to sell, sell, import, and otherwise transfer the Work,
118-
where such license applies only to those patent claims licensable
119-
by such Contributor that are necessarily infringed by their
120-
Contribution(s) alone or by combination of their Contribution(s)
121-
with the Work to which such Contribution(s) was submitted. If You
122-
institute patent litigation against any entity (including a
123-
cross-claim or counterclaim in a lawsuit) alleging that the Work
124-
or a Contribution incorporated within the Work constitutes direct
125-
or contributory patent infringement, then any patent licenses
126-
granted to You under this License for that Work shall terminate
127-
as of the date such litigation is filed.
128-
129-
4. Redistribution. You may reproduce and distribute copies of the
130-
Work or Derivative Works thereof in any medium, with or without
131-
modifications, and in Source or Object form, provided that You
132-
meet the following conditions:
133-
134-
(a) You must give any other recipients of the Work or
135-
Derivative Works a copy of this License; and
136-
137-
(b) You must cause any modified files to carry prominent notices
138-
stating that You changed the files; and
139-
140-
(c) You must retain, in the Source form of any Derivative Works
141-
that You distribute, all copyright, patent, trademark, and
142-
attribution notices from the Source form of the Work,
143-
excluding those notices that do not pertain to any part of
144-
the Derivative Works; and
145-
146-
(d) If the Work includes a "NOTICE" text file as part of its
147-
distribution, then any Derivative Works that You distribute must
148-
include a readable copy of the attribution notices contained
149-
within such NOTICE file, excluding those notices that do not
150-
pertain to any part of the Derivative Works, in at least one
151-
of the following places: within a NOTICE text file distributed
152-
as part of the Derivative Works; within the Source form or
153-
documentation, if provided along with the Derivative Works; or,
154-
within a display generated by the Derivative Works, if and
155-
wherever such third-party notices normally appear. The contents
156-
of the NOTICE file are for informational purposes only and
157-
do not modify the License. You may add Your own attribution
158-
notices within Derivative Works that You distribute, alongside
159-
or as an addendum to the NOTICE text from the Work, provided
160-
that such additional attribution notices cannot be construed
161-
as modifying the License.
162-
163-
You may add Your own copyright statement to Your modifications and
164-
may provide additional or different license terms and conditions
165-
for use, reproduction, or distribution of Your modifications, or
166-
for any such Derivative Works as a whole, provided Your use,
167-
reproduction, and distribution of the Work otherwise complies with
168-
the conditions stated in this License.
169-
170-
5. Submission of Contributions. Unless You explicitly state otherwise,
171-
any Contribution intentionally submitted for inclusion in the Work
172-
by You to the Licensor shall be under the terms and conditions of
173-
this License, without any additional terms or conditions.
174-
Notwithstanding the above, nothing herein shall supersede or modify
175-
the terms of any separate license agreement you may have executed
176-
with Licensor regarding such Contributions.
177-
178-
6. Trademarks. This License does not grant permission to use the trade
179-
names, trademarks, service marks, or product names of the Licensor,
180-
except as required for reasonable and customary use in describing the
181-
origin of the Work and reproducing the content of the NOTICE file.
182-
183-
7. Disclaimer of Warranty. Unless required by applicable law or
184-
agreed to in writing, Licensor provides the Work (and each
185-
Contributor provides its Contributions) on an "AS IS" BASIS,
186-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
187-
implied, including, without limitation, any warranties or conditions
188-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
189-
PARTICULAR PURPOSE. You are solely responsible for determining the
190-
appropriateness of using or redistributing the Work and assume any
191-
risks associated with Your exercise of permissions under this License.
192-
193-
8. Limitation of Liability. In no event and under no legal theory,
194-
whether in tort (including negligence), contract, or otherwise,
195-
unless required by applicable law (such as deliberate and grossly
196-
negligent acts) or agreed to in writing, shall any Contributor be
197-
liable to You for damages, including any direct, indirect, special,
198-
incidental, or consequential damages of any character arising as a
199-
result of this License or out of the use or inability to use the
200-
Work (including but not limited to damages for loss of goodwill,
201-
work stoppage, computer failure or malfunction, or any and all
202-
other commercial damages or losses), even if such Contributor
203-
has been advised of the possibility of such damages.
204-
205-
9. Accepting Warranty or Additional Liability. While redistributing
206-
the Work or Derivative Works thereof, You may choose to offer,
207-
and charge a fee for, acceptance of support, warranty, indemnity,
208-
or other liability obligations and/or rights consistent with this
209-
License. However, in accepting such obligations, You may act only
210-
on Your own behalf and on Your sole responsibility, not on behalf
211-
of any other Contributor, and only if You agree to indemnify,
212-
defend, and hold each Contributor harmless for any liability
213-
incurred by, or claims asserted against, such Contributor by reason
214-
of your accepting any such warranty or additional liability.
215-
216-
END OF TERMS AND CONDITIONS
217-
218-
APPENDIX: How to apply the Apache License to your work.
219-
220-
To apply the Apache License to your work, attach the following
221-
boilerplate notice, with the fields enclosed by brackets "[]"
222-
replaced with your own identifying information. (Don't include
223-
the brackets!) The text should be enclosed in the appropriate
224-
comment syntax for the file format. We also recommend that a
225-
file or class name and description of purpose be included on the
226-
same "printed page" as the copyright notice for easier
227-
identification within third-party archives.
228-
229-
Copyright [yyyy] [name of copyright owner]
230-
231-
Licensed under the Apache License, Version 2.0 (the "License");
232-
you may not use this file except in compliance with the License.
233-
You may obtain a copy of the License at
234-
235-
http://www.apache.org/licenses/LICENSE-2.0
236-
237-
Unless required by applicable law or agreed to in writing, software
238-
distributed under the License is distributed on an "AS IS" BASIS,
239-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
240-
See the License for the specific language governing permissions and
241-
limitations under the License.
242-
```

java/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
# Java based examples
22
This folder stores Java based examples for Oracle Database including JDBC, the Universal Connection Pool (UCP) and the embedded JVM in the database a.k.a. OJVM.
3+
4+
## What's in Oracle database 12c Release 2 for Java Developers?
5+
- Java 8: Java 8 in JDBC/UCP and OJVM; JDBC 4.2
6+
- JavaScript with Nashorn: JDBC/UCP, OJVM
7+
- Performance: JIT (OJVM), Network Compression over WAN (JDBC), Configurable connection health check frequency (UCP), PL/SQL Callback
8+
interface (JDBC)
9+
- Scalability: Shared Pool for Multi-Tenant Database (UCP), Shared Pool for Sharded database (UCP), Sharding Key APIs (JDBC, UCP),
10+
DRCP Proxy session sharing, DRCP support for multiple labels
11+
- High-Availability: Java APIs for FAN events (SimpleFan.jar), Planned Maintenance in the driver (JDBC), Application Continuity for XA
12+
Datasources, Transaction Guard for XA Datasource
13+
- Security: SSL v1.2 / TLS v 1.2 (JDBC)
14+
- Manageability: XMLconfiguration (UCP), Enable/disable/suspend/resume feature level logging (JDBC), MAX_THINK_TIME for Transactions
15+
in progress (DRCP), new statistics view and AWR reports
16+
- Ease of Use : Web Services Callout (OJCM), Long Identifiers (OJVM), PL/SQL Boolean (JDBC), Debugger for OJVM (Java Debug Wire
17+
Protocol)
18+
19+
## White paper: http://bit.ly/2orH5jf

java/jdbc/ConnectionManagementSamples/Readme.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# Connection Management Samples in JDBC using UCP, Universal Connection Pool
1+
# Connection Management Samples in JDBC
22

3-
Brief descriptions of connection management related code samples.
3+
Brief description of connection management related code samples.
44

55
|Author | Date |
66
|-------|------|
77
|nirmala.sundarappa|06/14/16|
88

9-
10-
==============================================================================
9+
----
1110
Creating a connection is an expensive database operation which
1211
involves several background operations such as network communication, reading
1312
connection strings, authentication, transaction enlistment, foreground process
@@ -22,6 +21,11 @@ connection management strategy. The section below provides more details on
2221
specific connection management strategy.
2322

2423
----
24+
## DataSourceSample.java:
25+
This sample shows how to connect to a simple DataSource
26+
(oracle.jdbc.pool.OracleDataSource) and how to set connection related
27+
properties such as `defaultRowPrefetch`, `defaultBatchValue` etc.,
28+
2529
## InternalT2Driver.sql & InternalT2Driver.java:
2630
The server-side Type 2 (T2S) driver (aka KPRB driver) is for Java in the
2731
database. It uses database session directly for accessing local data.
@@ -33,11 +37,6 @@ The server side Type 4(T4S) driver (aka thin/T4 driver) is used for code
3337
running Java in database session needing access to another session either on
3438
the same RDBMS instance/server or on a remote RDBMS instance/server.
3539

36-
## DataSourceSample.java:
37-
This sample shows how to connect to a simple DataSource
38-
(oracle.jdbc.pool.OracleDataSource) and how to set connection related
39-
properties such as `defaultRowPrefetch`, `defaultBatchValue` etc.,
40-
4140
## ProxySessionSample.java and ProxySessionSample.sql:
4241
This sample shows connecting to the Oracle Database using Proxy
4342
authentication or N-tier authentication. Proxy authentication is the

java/ojvm/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# OJVM based examples
22
This folder stores Java based examples for the embedded JVM of the Oracle Database (a.k.a. OJVM).
3+
34
Running Java in Oracle database OJVM allows reusing Java code, Java libraries, Java skills (developers) for data-bound applications.
4-
Running Java code directly in the database cuts networm trafic thereby resulting in better performance.
5-
Some of the examples show running the same code inside and outside the database (as plain Java client code).
5+
Running Java code directly in the database cuts networm trafic thereby resulting in better performance. Some of the examples show running the same code inside and outside the database (as plain Java client code).
6+
7+
Documentation http://docs.oracle.com/database/122/JJDEV/toc.htm
8+
9+
What's in Oracle database 12c Release 2 for Java & JavaScript Developers? http://bit.ly/2orH5jf
10+
11+
Community Forum https://community.oracle.com/community/database/developer-tools/jvm

javascript/nashorn/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2-
# Nashorn based examaples
2+
# Nashorn based examples
33
Java 8 furnishes Nashorn, a JavaScript engine which runs on the JVM including JDK, JRE, and the embeded JVM in the Oracle database a..k.a. OJVM.
4-
This folder stores the JavaScript Nashorn based examples for Oracle Database: JavaScript with OJVM, JavaScript with JDK/JRE.
4+
This folder stores the Nashorn based examples for the Oracle Database 12c Release 2 including JavaScript with OJVM, JavaScript with JDK/JRE.
5+
6+
Documentation http://bit.ly/2nstiYQ
7+
8+
What's in Oracle database 12c Release 2 for Java & JavaScript Developers? http://bit.ly/2orH5jf
9+
10+
Community Forum https://community.oracle.com/community/database/developer-tools/jvm

javascript/node-oracledb/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
These are examples for the [node-oracledb 1.13 driver](https://www.npmjs.com/package/oracledb)
2+
3+
The node-oracledb add-on for Node.js powers high performance Oracle Database applications.
4+
5+
[node-oracledb installation instructions](https://github.com/oracle/node-oracledb/blob/master/INSTALL.md)
6+
7+
[Node-oracledb documentation](https://github.com/oracle/node-oracledb/blob/master/doc/api.md)
8+
9+
[Issues and questions](https://github.com/oracle/node-oracledb/issues)
10+
11+
After installing node-oracledb, the demos can be run by editing
12+
dbconfig.js to set your database credentials, creating the schema
13+
objects with demo.sql, and then executing each JavaScript file with
14+
Node.js.

0 commit comments

Comments
 (0)